Copy link to clipboard
Copied
I inserted a field that has today's date auto-populate. I want to create another field that will auto-populate a date that is the same month and day but the year will be the NEXT year.
Using today as an example:
Here is the auto-populated field for today's date
And this is what it's called:
I need a field that will populate the date to Jun 23, 2022 automatically (based off the other date).
Hope that made sense.
Is this possible?
A better solution is to use the built-in methods of the Date object to do it, which will take care of the Feb 29th issue without having to hard-code each leap year into it:
var sDate = this.getField("Cur_Date").valueAsString;
if (sDate) {
var cDate = util.scand("mmm dd, yyyy", sDate);
cDate.setFullYear(cDate.getFullYear()+1);
event.value = util.printd("mmm dd, yyyy", cDate);
} else event.value = "";
Copy link to clipboard
Copied
Most (maybe all) scripts will stop working when the file is converted to Adobe Sign.
Copy link to clipboard
Copied
Oh good to know, thank you.
Is there any way around that?
The script that autopopulates today's date seems to work. It's weird that the other one doesn't
Copy link to clipboard
Copied
> Is there any way around that?
Don't use Adobe Sign.
Or use only features supported by Adobe Sign.
Copy link to clipboard
Copied
Ok thank you