PDF Editing Issues

How to Automatically Insert Today's Date in an Acrobat PDF Form

Steven ParkerSteven Parker Nov 3, 2026 869 views

Question details

The user wants a date field in a PDF form to automatically populate with the current date whenever the document is opened.

How to Automatically Insert Today's Date in an Acrobat PDF Form
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Preparing a PDF form for distribution or signature collection where the current date must be auto-filled to save time and ensure accuracy.
Observed behavior
The date field requires automation so it displays today's date automatically without requiring manual user input upon opening the file.
Before you start

Ensure you have Adobe Acrobat Pro DC or Standard installed, as the free Adobe Acrobat Reader cannot author or embed document-level JavaScript into PDF forms.

Solution 1Recommended

Use Document-Level JavaScript in Acrobat Pro

The most effective way to auto-populate a date field is by applying a short JavaScript snippet that executes as soon as the PDF is opened.

By utilizing document-level JavaScript, you can instruct the PDF to read the current system date and inject it into a specific read-only text field. This ensures the date is always accurate at the moment of opening.

1
Prepare the Date Field

Open your PDF in Acrobat Pro. Go to 'Prepare Form', add a new Text field, and name it exactly 'currentDate'. Open the field's Properties, and under the 'General' tab, check the box for 'Read Only' so users cannot manually alter it.

2
Access the JavaScript Tool

Navigate to the 'Tools' view in Acrobat DC. Locate the 'JavaScript' tool (you can search for it if it is not immediately visible) and click to open it.

3
Add Document JavaScript

In the JavaScript toolbar, click on 'Document JavaScripts'. In the dialog box that appears, type a name for your script (e.g., 'AutoDate') and click the 'Add' button.

4
Insert the Code

Delete any default code in the editor window and paste the following snippet: `var dateToday = util.printd("mmmm dd, yyyy", new Date()); this.getField("currentDate").value = dateToday;`. Click 'OK', then close the dialog and save your PDF.

Use Document-Level JavaScript in Acrobat Pro
Acrobat Sign Compatibility: If you plan to use Adobe Acrobat Sign to collect signatures, test your workflow carefully. Acrobat Sign frequently applies its own automated signing date field during the signature process, which may override or conflict with custom date scripts.
Streamlined PDF Editing

Easily Edit and Manage PDF Forms with WPS Office

If you want to avoid complex JavaScript coding or simply need an easier way to manage, edit, and fill out PDF forms, WPS Office provides an intuitive and powerful PDF editor.

  1. 1. Open your PDF in WPS Office: Launch WPS Office and open your PDF form using the built-in WPS PDF tool.
  2. 2. Access the Form or Edit tab: Navigate to the 'Edit' or 'Form' tab at the top of the interface to access all PDF modification tools.
  3. 3. Insert Date or Fill Form: Use the 'Add Text' tool to quickly stamp today's date, or utilize the interactive form filler to complete your document effortlessly.
Easily insert text, current dates, and signatures into any PDF document.Fully compatible with standard PDF formats and interactive forms.Lightweight, fast, and user-friendly interface without a steep learning curve.Cross-platform support for Windows, Mac, Linux, and mobile devices.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the date update automatically when I open the PDF?

If the script isn't running, ensure that JavaScript is enabled in your Acrobat settings (Edit > Preferences > JavaScript). Also, verify that the text field is named exactly 'currentDate' (case-sensitive) and that the script was saved as a Document-level script, not a field calculation script.

Can I change the format of the auto-inserted date?

Yes. In the JavaScript code `util.printd("mmmm dd, yyyy", new Date())`, you can modify the format string. For example, use "mm/dd/yyyy" for a standard numerical format like 12/31/2023.

Do I need Acrobat Pro to add this date script?

Yes, you need Adobe Acrobat Pro or Standard to author and embed document-level JavaScript. The free Adobe Acrobat Reader can execute the script when opening the file, but it does not have the tools required to create or inject the code.