Copy link to clipboard
Copied
Hello,
I am trying to create a custom dynamic stamp that posts a future date. For example, when I open my custom stamp on a document I want the date to display 9 days later. I have followed the tutorial on how to create a custom dynamic stamp, but I am unable to find javascript that will work to output a future date. I have tried looking online for future date javascript that should theoretically work, but it doesn't work in my stamp or just even when I play around with form fields. Can someone please help?
The current date script I have is:
event.value = (new Date()).toString();
AFDate_FormatEx("mmm dd, yyyy");
Thank you,
Lynnette
Copy link to clipboard
Copied
Try this:
var d1 = util.scand("mmm dd, yyyy",new Date());
d1.setDate(d1.getDate() +9);
event.value = util.printd("mmm dd, yyyy", d1);
Copy link to clipboard
Copied
Try this:
var d1 = util.scand("mmm dd, yyyy",new Date());
d1.setDate(d1.getDate() +9);
event.value = util.printd("mmm dd, yyyy", d1);
Copy link to clipboard
Copied
That's great! Yes, thank you so much. It worked!

