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

Passport Expiry date

Community Beginner ,
Sep 29, 2024 Sep 29, 2024

Copy link to clipboard

Copied

Hello 

Appreciate help to create java script 

When I put issue date of passport  it will appear automatically date of Expiry for passport 

For example

 If insert Date of issue: 29/5/2024

 Feild of Date of Expiry shown automatically: 28/5/2031

Regards, 

TOPICS
JavaScript , PDF , PDF forms

Views

79

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

correct answers 1 Correct answer

Community Expert , Sep 29, 2024 Sep 29, 2024

It looks like the expiry date is 7 years from the issue date, but you don't say that.  Is it?  Enter the following custom calculation script in the Date of Expiry Field:

var issue=this.getField("Date of issue").value;
if(!issue)
{event.value=""}
else
{
var date=issue;
var d = util.scand("dd/mm/yyyy", date);
d.setFullYear(d.getFullYear() +7);
d.setDate(d.getDate()-1)
event.value = util.printd("dd/mm/yyyy",d);
}

Votes

Translate

Translate
Community Expert ,
Sep 29, 2024 Sep 29, 2024

Copy link to clipboard

Copied

It looks like the expiry date is 7 years from the issue date, but you don't say that.  Is it?  Enter the following custom calculation script in the Date of Expiry Field:

var issue=this.getField("Date of issue").value;
if(!issue)
{event.value=""}
else
{
var date=issue;
var d = util.scand("dd/mm/yyyy", date);
d.setFullYear(d.getFullYear() +7);
d.setDate(d.getDate()-1)
event.value = util.printd("dd/mm/yyyy",d);
}

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
Adobe Employee ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

Hi @ali_3480 

Are you able to make toe correct JS now?

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 Beginner ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

LATEST

Yes dear 

It is working

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