Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Calculate Future Date - Can I Manually Override?

New Here ,
Apr 10, 2023 Apr 10, 2023

In a PDF form I have fields where future dates are being calculated by script. 

Is there a way to allow for a manual override of the automatic date, if the manager wants to shorten the timeframe for the contract?

TOPICS
Edit and convert PDFs , How to , JavaScript , PDF forms
561
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 10, 2023 Apr 10, 2023

Hi @Dawn Dawn 909 ,

 

Would you mind sharing the script and also state where is it executed from and what type of script (i.e. Custom Calculation Script, Validating Script, etc) ?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 11, 2023 Apr 11, 2023
LATEST

Hi there,

Absolutely, it is a Custom Calculation Script.

var date= util.scand("mm/dd/yyyy", this.getField("FromDate").value);
date.setDate(date.getDate()-30)
if (this.getField("FromDate").value!="")
{
event.value=util.printd("mm/dd/yyyy",date)
}
else
{event.value=""}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines