Create a PDF Date Field with an Ordinal Suffix in Adobe Acrobat
Question details
Create a PDF form date field that retains a calendar picker and displays the date with an ordinal suffix and the word “day.”

- Product
- PDF form editor, such as Adobe Acrobat Pro
- Device & OS
- not provided
- Scenario
- A form recipient selects a date from a calendar, and the form displays it in a format such as “3rd day of December, 2022.”
- Observed behavior
- The desired date format may appear while the field is being edited but revert when the field loses focus.
Open the PDF in a form editor that supports date fields and Acrobat JavaScript, such as Adobe Acrobat Pro. Decide where to place both the calendar input and the formatted display field.
Use a date picker and a separate calculated display field
Keep the calendar picker in one field and show the ordinal date in a second field that updates after the date is entered.
This approach leaves both fields visible rather than using scripts to show and hide overlapping fields. The example expects the input date to use the mm/dd/yyyy format.
In Adobe Acrobat Pro, open the PDF and choose Prepare a Form. Add a text field named DateInput, open its Properties, and select Format > Date with the mm/dd/yyyy format.
Add a second text field named DateDisplay. In its Properties, select Read Only on the General tab and leave its format as None.
In DateDisplay Properties, open Calculate, select Custom calculation script, and click Edit. Enter: var s = this.getField("DateInput").valueAsString; var m = /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/.exec(s); if (!m) { event.value = ""; } else { var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var month = Number(m[1]), day = Number(m[2]); var suffix = (day % 100 >= 11 && day % 100 <= 13) ? "th" : ({1:"st", 2:"nd", 3:"rd"}[day % 10] || "th"); event.value = (month >= 1 && month <= 12) ? day + suffix + " day of " + months[month - 1] + ", " + m[3] : ""; }
Save the PDF, switch out of form editing, and select a date in DateInput. Click outside the field and check that DateDisplay shows the formatted result, such as “3rd day of December, 2022.”

Add a Formatted Date as Text in WPS PDF
For a fixed date rather than an interactive form field, use WPS PDF to add the ordinal date as text. This does not provide a calendar picker or automatically update the date.
- 1. Open the PDF: Launch WPS Office and open the PDF where you want the date to appear.
- 2. Add text: Choose Edit and use the option to add text, then click the desired location on the page.
- 3. Enter the date: Type the date in your preferred format, such as “3rd day of December, 2022,” and adjust the text formatting as needed.
- 4. Save the PDF: Use File > Save As to save the edited PDF, then reopen it to check the date placement.

Frequently Asked Questions
Why does my custom date format disappear when I leave the field?
A PDF field can use different formatting behavior while focused and when displaying its value. A separate calculated text field lets the date input retain its date format while displaying the custom wording elsewhere.
Can I keep the calendar picker and show an ordinal date?
Yes. In Acrobat Pro, use a date-formatted input field for the picker and a second, read-only field with a custom calculation script for the ordinal display.
How does the script handle 11th, 12th, and 13th?
The calculation checks whether the day falls between 11 and 13 before applying the usual st, nd, or rd endings. Those three dates receive the suffix “th.”
Will the calculated date work in every PDF viewer?
No. Calendar picker and PDF JavaScript support vary by viewer. Open the saved form in the intended viewer, select a date, and click outside the input to verify the result.




