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

Due dates populated by drop down list

New Here ,
Nov 15, 2019 Nov 15, 2019

Copy link to clipboard

Copied

I am trying to create a due date that is based on a drop down list and todays date. Example: Drop down selection is 30, 60 or 90 days. Todays date Nov 15, 2019. When drop selection is 30, I want the Due Date to populate with the date for Dec 15, 2019 (30 days from today) 

I got some what there wiht the Value Calculate but the Due Date field is showing as NAN.

 

Is there a script I am missing or formating the cells incorrectly? Appreicate the help 🙂 

TOPICS
General troubleshooting , PDF forms

Views

298

Translate

Translate

Report

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 ,
Nov 16, 2019 Nov 16, 2019

Copy link to clipboard

Copied

Hi,

 

Can you share the script that you suspect is not populating the projected date?

 

If some fields are getting the right answer but not others, have you checked for typos in your script?

Votes

Translate

Translate

Report

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 ,
Nov 16, 2019 Nov 16, 2019

Copy link to clipboard

Copied

Hi, 

 

I actually didn't use a script. Under the properties for the Due Date i used the calculate cells. Interval Date + Todays Date. I have the values for the Intervals set up 30, 60, 90 and todays date entered as mm/dd/yyyy

Votes

Translate

Translate

Report

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 ,
Nov 16, 2019 Nov 16, 2019

Copy link to clipboard

Copied

Unfortunately date calculations don't work this way.

You'll need to use a script. You can read all about it here:

https://acrobatusers.com/tutorials/date_time_part1

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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
LEGEND ,
Nov 17, 2019 Nov 17, 2019

Copy link to clipboard

Copied

LATEST

The date values you are working with are character strings and not numeric strings. The "+" operator for character strings performs the concatenation, joining, of the 2 strings and not adding the numeric values of the string. PDF and its associated JavaScript Date and Time object assigns a unique value to each millisecond and hence each date ant time. This object has many properties and many methods that let one compare, adjust, rank, etc each date and time value. As one manipulates a date object by either days or months the months and years are automatically adjusted bases on the number of days for the specific month, including adjustments for the added day in February of leap years/centuries. The Date and Time object also adjusts for Day Light Saving Time changes base on one's computer settings.

Votes

Translate

Translate

Report

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