Skip to main content
Participant
August 12, 2022
解決済み

Create Custom Dynamic Stamp with Future Date

  • August 12, 2022
  • 返信数 1.
  • 1532 ビュー

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

このトピックへの返信は締め切られました。
解決に役立った回答 Nesa Nurani

Try this:

var d1 = util.scand("mmm dd, yyyy",new Date());
d1.setDate(d1.getDate() +9);
event.value = util.printd("mmm dd, yyyy", d1);

返信数 1

Nesa Nurani
Community Expert
Nesa NuraniCommunity Expert解決!
Community Expert
August 12, 2022

Try this:

var d1 = util.scand("mmm dd, yyyy",new Date());
d1.setDate(d1.getDate() +9);
event.value = util.printd("mmm dd, yyyy", d1);

Participant
August 12, 2022

That's great! Yes, thank you so much. It worked!