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

Passport Expiry date

Explorer ,
Sep 29, 2024 Sep 29, 2024

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
560
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
1 ACCEPTED SOLUTION
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);
}

View solution in original post

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 ,
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);
}

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

Hi @ali_3480 

Are you able to make toe correct JS now?

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

Yes dear 

It is working

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