Adding days to PDF calendar

Community Beginner ,
Jul 24, 2022 Jul 24, 2022

Copy link to clipboard

Copied

I am working on a PDF form.  I have a text field (formatted mm/dd/yyyy dddd), I wish to add another text field later in the document to add 14 days to this calendar.  What is the best way to accomplish this task?  

Thanks

Doug

TOPICS
Create PDFs , PDF forms

Views

24

Likes

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
Adobe Community Professional ,
Jul 24, 2022 Jul 24, 2022

Copy link to clipboard

Copied

LATEST

Use this as validation script of first date field and change "Date field2" to your second date field name:

if(event.value == "")
this.getField("Date field2").value = "";
else{
var days = util.scand("mm/dd/yyyy dddd", event.value)
days.setDate(days.getDate() +14);
this.getField("Date field2").value = util.printd("mm/dd/yyyy dddd", days);}

Likes

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