Fix Incorrect Time in Adobe Acrobat PDF Date and Time Fields
Question details
A PDF form field shows an outdated or incorrect time instead of updating to the current time when the form is opened or interacted with.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Opening or filling out an interactive PDF form that requires a current date and timestamp.
- Observed behavior
- The date field may display the correct date, but the time portion remains static, showing an old or incorrect value rather than the live system time.
Ensure you have form editing privileges for the PDF document and that JavaScript execution is enabled in your PDF viewer preferences.
Update the field dynamically with an OnFocus JavaScript action
Use a custom script to automatically insert the current date and time whenever a user selects the field.
By default, PDF text fields remain static unless they are programmed to calculate or retrieve new data. Adding an OnFocus trigger ensures the time updates exactly when the user is ready to finalize that specific field.
Right-click the specific date and time field in Adobe Acrobat's Prepare Form mode and select 'Properties'.
Click on the 'Actions' tab located at the top of the Properties dialog box.
From the 'Select Trigger' drop-down menu, choose 'OnFocus'.
From the 'Select Action' drop-down, choose 'Run a JavaScript' and click the 'Add' button.
Type the following script exactly: event.target.value = util.printd("m/d/yyyy h:MM tt", new Date()); then click 'OK' and close the properties window.

Manually enter the correct time using your keyboard
If you are unable to use JavaScript or if scripts are disabled by the recipient's PDF viewer, the time must be typed manually.
Edit and Manage PDF Forms Easily with WPS Office
WPS Office provides a highly compatible, robust PDF editor that allows you to easily view, fill, and modify PDF forms without worrying about complex script errors.
- 1. Open the PDF File: Launch WPS Office and open your interactive PDF document.
- 2. Access PDF Editing Tools: Navigate to the 'Edit' or 'Form' tab depending on whether you need to modify the document structure or simply fill fields.
- 3. Fill the Required Fields: Click on any text or date field to smoothly input the current time and required information.
- 4. Save and Export: Click 'Save' or use the export options to finalize your document securely.

Frequently Asked Questions
Why doesn't my PDF date and time field update automatically when opened?
Standard PDF form fields are static by design. Unless a specific calculation or JavaScript trigger (like OnFocus or Page Open) is applied to the field, it will retain the last entered value indefinitely.
Will the JavaScript time fix work in web browsers?
Not reliably. Many default PDF viewers built into web browsers (like Chrome or Edge) disable or have limited support for JavaScript form actions. For dynamic fields to function correctly, the form should be opened in a dedicated desktop PDF application.
How can I format the PDF time to a 24-hour format instead of AM/PM?
You can modify the format string in your JavaScript. Change the script to use a 24-hour format by entering: event.target.value = util.printd("m/d/yyyy HH:MM", new Date());




