Acrobat JavaScript Date picker for custom dialogue

New Here ,
May 29, 2020 May 29, 2020

Copy link to clipboard

Copied

Is there a JavaScript for a date picker for a custom dialogue which is used to create an acrobat dynamic stamp? The custom dialogue has several text fields and radio buttons on it, and the user has to type in a date (not the current date). If it is possible, I would like the user to select a date from a date picker, but I don't know if this can be done.

TOPICS
Acrobat SDK and JavaScript

Views

252

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 ,
May 29, 2020 May 29, 2020

Copy link to clipboard

Copied

No, nothing like this already exists.

You can always validate the date and force the user to enter a valid one before leaving the dialog. 

Or use dropdowns for setting the day/month/year. 

Or create a custom date picking popup dilaog. 

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

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
New Here ,
Apr 14, 2021 Apr 14, 2021

Copy link to clipboard

Copied

Thanks Thom.
What did you meant about "creating a custom date picking popup dialog" and how to acheive it?

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 ,
Apr 15, 2021 Apr 15, 2021

Copy link to clipboard

Copied

You'll find a "pop-up" calendar here that you can copy and paste onto your PDF.  Read the instructions carefully. 

https://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm

 

 

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

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
New Here ,
Apr 15, 2021 Apr 15, 2021

Copy link to clipboard

Copied

Thanks for your contribution, very useful. I had looked at your implementation but it is not so clear for me how to port that one on custom dialogs since there is no hidden property as it is for regular form fields in Acrobat. I guess it should be tricky to acheive it. so I hope I could port it later.

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 ,
Apr 22, 2021 Apr 22, 2021

Copy link to clipboard

Copied

LATEST

I wasn't very clear. I presented to separate solutions. The first was to create a simple custom dialog for picking the date. Not a calendar popup. A calendar popup is a complex and and advanced programming task in any programming language. Fortunately, someone has already done this for Acrobat using form fields and JavaScript, which was the second solution I suggested, that you can download at the link. The PDF file provides instructions for porting over the calendar fields and scripts to your own PDF. 

 

 

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

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
New Here ,
May 29, 2020 May 29, 2020

Copy link to clipboard

Copied

Thank you Thom. I suspected this was the case. I couldn't find anything in my searches.

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