Format and Validate Date Fields in Acrobat PDF Forms
Question details
Configure a PDF form to accept single- and double-digit days, display day ranges, and populate month and year fields from a calendar selection.

- Product
- Adobe Acrobat PDF forms
- Device & OS
- not provided
- Scenario
- A form designer is setting up day, date range, month, and year fields in a PDF form.
- Observed behavior
- The form should accept the intended day values and ranges and derive the month and year from a selected date.
Open the form in Adobe Acrobat and choose All tools > Prepare a form. Decide whether each field should hold a day, a day range, or a complete date, and assign distinct field names.
Use a drop-down list for a day-only field
Use this option when users need to select a day from 1 through 31 without entering a complete date.
A day alone is not a complete date. Acrobat's date formatting may reject values that do not match the configured format; for example, dd expects a two-digit day.
In Prepare a form, add a drop-down field and name it Day.
Open the field's Properties, select Options, and add entries from 1 through 31. Use labels such as 01 through 31 instead if you want every displayed day to have two digits.
Choose Preview in Prepare a form and select several days from the Day list.

Validate a day range in a text field
Use a text field and custom JavaScript when users must enter a range such as 07-08.
Populate month and year from a complete date
Use a full date field and calculated fields when a calendar selection should supply the month and year.
View and Annotate PDF Forms with WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for viewing and annotating PDFs and working with Office documents. Its format compatibility makes it easy to move existing files into your workflow. Use Acrobat for the form-field scripts described above.

Frequently Asked Questions
Why does my day field reject a single digit?
A field configured with the dd date format expects a two-digit day. For a day-only selection, use a drop-down list in Prepare a form instead of applying a full date format.
Can an Acrobat date field display 07-08 as a range?
A standard date field represents one date, not a day range. Use a text field with custom validation under Properties > Validate, or create separate fields for the start and end days.
How do I fill month and year fields from a calendar selection?
Create a complete date field, then add Month and Year fields with custom calculation scripts under Properties > Calculate. The scripts must parse the same format configured for the date field.
Why are the calculated fields not updating in my PDF viewer?
Check that the field names and date format match the calculation scripts. Also check the viewer's JavaScript settings and test the form in Acrobat or a compatible version of Acrobat Reader.




