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

Acrobat JavaScript Date picker for custom dialogue

New Here ,
May 29, 2020 May 29, 2020

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

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

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

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

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

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

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

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.

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

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
New Here ,
May 29, 2020 May 29, 2020
Thank you Thom. I suspected this was the case. I couldn't find anything in my searches.

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