Copy link to clipboard
Copied
I want to give my customers the option of inputting mm/yyyy OR yyyy OR mm/dd/yyyy on the adobe pdf fillable form when I send it to them but am having trouble making this work.
Does anybody know how to do this?
THANKS!
AW
Copy link to clipboard
Copied
I would suggest the following
1. use a keystroke event to authorize only digits and the "/" character
2. Test the length property (7, 4 or 10) to determine the format chosen by the user
3. if the result is 7 or 10, Try to convert the string to a date Object to reject any value that is not a valid date
Copy link to clipboard
Copied
The provided format options use some behind the scenes scripting for the keystroke (only allowing valid valid characters for the format), validation (the value entered is a valid date), and format (the correct display for the date format is used). Since you have very diverse and very different formats, I think you may only be able to perform the validation and formatting by using some very custom JavaScript.
This seems like a very unusual requirement.