I've seen these sort of Javascript date functions - but they aren't helping me with my month increment project.
Is there a way to parse out the month value, increment by one and reassemble into a date format?
Main Topics
Browse All TopicsI have built an Adobe form to display a payment schedule:
Due Date, Payment Amt, Balance
The goal is to have 3 input fields and have the form do the rest. The input fields are:
Start Date, Monthly Payment, Initial Balance.
I have got everything in place for the Payment Amt and Balance columns including the if statements to determine when the 'loop' is done - but I'm having difficulty with the Due Dates. I want each payment to be on the same day of each month:
Initial Date: 02/01/2009
Payment2: 03/01/2009
Payment3: 04/01/2009
etc.
Simply adding days or seconds won't suffice since each month has a different length. I want to add 1 month for each row.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The script is being added to a field in an Adobe Acrobat Form. So, I stripped out the HTML and the validation.
This is what I was left with:
var val = this.getField("PaymentDate
event.value = new Date( RegExp.$4, RegExp.$1 - 1, RegExp.$3 );
I am getting the following error message:
InvalidSetError: Set not possible, invalid or unknown.
Event.value:2:AcroForm:Dra
My Bad. Copied it over exactly and I'm getting the following error in the JavaScript debugger:
redeclaration of const info
2:AcroForm:Draft Due DateRow2:CalculateExceptio
redeclaration of const info
2:AcroForm:Draft Due DateRow2:Calculate
Just to be sure, I renamed all of the variables:
var val222 = this.getField("Draft Due DateRow1").value;
var data222 = val222.split( '/' );
event.value = new Date( data222[ 2 ], data222[ 0 ] - 1, data222[ 1 ] );
The script was applied to the form field named: Draft Due DateRow2
Got the following error:
Exception in line 3 of function top_level, script Field:Calculate
InvalidSetError: Set not possible, invalid or unknown.
Event.value:3:Field Draft Due DateRow2:Calculate
Thanks for that...
Did the suggestion in http:#a25235182 help?
Business Accounts
Answer for Membership
by: HonorGodPosted on 2009-09-01 at 08:13:40ID: 25232400
Take a look at this article
e.com/arti cles/Progr amming/ Lan guages/Scr ipting/Jav aScript/Ca n-I-have-a -date.html
http://www.experts-exchang