Skip to main content
New Participant
April 29, 2024
Answered

Acrobat Interactive PDF with 2 digit years, problem with the year 2000...

  • April 29, 2024
  • 3 replies
  • 2502 views

Hello,

 

I have some enrollment forms that contain a lot of fields for dates. The date fields are set up as 3 separate fields that can be tabbed through. I have no issues with the months and days but when inputting the year 2000 (2 zeroes), the field only populates with 1 zero. Is it possible to get 2 zeroes? 01/01/00. The client requested 2 digit years and the client called this issue out so I need some sort of solution. There are many instances across numerous forms. The file was built in InDesign but all functionality is done in acrobat. Thank you!!!

Correct answer Nesa Nurani

Tried that already. Allows all characters then. FRD allows for only numbers. Thank you again


If you only want to allow a numbers to be typed into the field, select 'Custom' format and as 'Custom keystroke script' enter this:

event.rc = /^\d*$/.test(event.change);

3 replies

try67
Brainiac
April 30, 2024

> The client requested 2 digit years 

Tell them it's a bad idea, then. It's basically reintroducing the Y2K-bug, which was never fully solved.

Here's an example of it just from this week: https://www.bbc.com/news/articles/c9wz7pvvjypo

JR Boulay
Brainiac
April 30, 2024

😉

 

Acrobate du PDF, InDesigner et Photoshopographe
Abambo
Brainiac
May 1, 2024

Are you saying that the Romans, living 2000 years before you did, wrote the dates wrong, and that their computers therefore failed?

ABAMBO | Hard- and Software Engineer | Photographer
Nesa Nurani
Inspiring
April 30, 2024

It's not a very smart idea to use 'yy' as the date format for a year, for obvious reasons, but you should still be able to input two zeroes, so first thing to check is how is the field formatted?

New Participant
April 30, 2024

Thank you Nesa! Appreciate your time and knowledge. I think we will move away from the 2 digit year pending client approval but it couldn't hurt for me to know how it can be done, can you explain? This is how it is formatted...

Nesa Nurani
Inspiring
April 30, 2024

Set format to 'None'.