Add date selectors to date fields in interactive PDF

A feature of Acrobat DC that can be quite handy is the prepare form feature. It allows a scan (or a document with no form-field elements) to have form-field elements applied to it, so long as the formatting of the artwork follows the practices listed in this document.

However, there is an improvement that I feel could be made to this feature, but may have been missed by the Acrobat team, and that is date fields. Take the following example:

Now run the Prepare Form feature of Adobe Acrobat DC Professional:

The signature is picked up OK, but the date field is just a text field.

After doing a little digging online, I found that changing the name of the Date field to something like Date_af_date (the importance being the _af_date text) and this will change it to a date field;

But it doesn’t truly act like a date field. If I close out of preview mode and tab to the text field, it behaves like a regular text field.

It isn’t until the format category is changed to date that the field behaves like a date field with a date picker.

So that’s fine to edit one field, but if there are lots of date fields to edit, or this is a regular task, it can be time consuming. Ultimately, I’d like Acrobat’s prepare form feature to detect the date fields just like other fields like text inputs and signature fields are auto detected.

Until that happens, I’ve created an Acrobat action that will run not just the prepare form feature, but also a javascript that will find any of the resulting fields that have the word Date (case-sensitive) in them and make them selectable date fields. That action can be downloaded here.

To change the date format, open up the Acrobat action and change the following line in the script:

The number in brackets can be changed from 5 to a value between 0-13 that represents a format as shown below:

0: m/d
1: m/d/yy
2: mm/dd/yy
3: mm/yy
4: d-mmm
5: d-mmm-yy
6: dd-mmm-yy
7: yy-mm-dd
8: mmm-yy
9: mmmm-yy
10: mmm d, yyyy
11: mmmm d, yyyy
12: m/d/yy h:MM tt
13: m/d/yy HH:MM

In the meantime, if you would like the Acrobat team to update the prepare form feature so that date fields are automatically detected, I’ve added it to the Acrobat Uservoice wishlist.

2 comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.