These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Adobe Acrobat JavaScript Popup Calendar

jcFarlow2
Registered: Jul 2 2009
Posts: 2
Answered

I am look for a help/information on how to allow a form user to click on a button or field and have a popup calendar display. The user would be able to select a date from the calendar and have the select date populate a form field.

My Product Information:
Acrobat Pro 7.0, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
See [url=http://www.acrobatusers.com/tutorials/2006/date_time_part2]Working with date and time in Acrobat JavaScript (part 2 of 3)[/url] and scroll down to the 'Using dates in a Form Calculation'. If you try to duplicate this form, you will need to copy all of the fields for the hidden calendar and the document level JavaScript functions for setting up, moving, and processing the selected date.

George Kaiser

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
In reviewing the linked article and form, I noticed that the pop-up calendar does not populate the month of February properly for non-leap year centries. For a centry year to be a leap year the centry need to be divisible by 400 not 4.

The code for the document level 'SetDays()' function need to changed as follows:

Replace the line: if( IsLeapYear(top.getField("CalendarYear").value) )
with the following line of code: if(top.getField("CalendarYear").value % 4 == 0 && (top.getField("CalendarYear").value % 400 == 0 || top.getField("CalendarYear").value % 100 != 0))

George Kaiser

madhuprasad
Registered: Jan 16 2008
Posts: 6
Hi

I have a same kind of issue with Popups..please help

I got a new kind of requirement from my clients that need to fill the form through popup window options.
actual requirement is - when i click a button/textfield, this will generate a popup with multiple options and user will pick one and that will reflect in the form textfield.

I don't know how to create layers and am using Acrobat8, so it would be great if you could help me by creating a sample form with this requirement.

Thanks in advance!!
madhuprasad
Registered: Jan 16 2008
Posts: 6
Hi

I got a new kind of requirement from my clients that need to fill the form through popup window options.
actual requirement is - when i click a button/textfield, this will generate a popup with multiple options and user will pick one and that will reflect in the form textfield.

I don't know how to create layers and am using Acrobat8, so it would be great if you could help me by creating a sample form with this requirement.

Thanks in advance!!
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
Thank you very much, gkaiseril.
;)