Copy link to clipboard
Copied
Hey Adobe Community!!! Thanks for always taking the time for people like me who don't know anything! 😉
How do I make numbers automatically change to date format Adobe forms?
For example typing: 05152024 I want it to automatically change to 05/15/2024 format
I already did the "change the "Format" tab in the properties to Date format.. I'm in the tab where I need to make it a "custom " format.
I want to know if there is a "code" or some script to make it auto-populate to date format.
Also is there a way to have a text field box automatically set it to be today's date?
Thanks a lot for all your help, time, and knowledge in advance!
Try this as custom format script:
var input = event.value;
if (/^\d{8}$/.test(input)) {
var month = input.substring(0, 2);
var day = input.substring(2, 4);
var year = input.substring(4, 8);
event.value = month + "/" + day + "/" + year;}
Copy link to clipboard
Copied
Still lost with this. Please advise!
Copy link to clipboard
Copied
Try this as custom format script:
var input = event.value;
if (/^\d{8}$/.test(input)) {
var month = input.substring(0, 2);
var day = input.substring(2, 4);
var year = input.substring(4, 8);
event.value = month + "/" + day + "/" + year;}
Copy link to clipboard
Copied
YOU ARE THE BEST!!!!!!!!!!!!! THANK YOU!!!!!!! That worked!!!!
Also, Is there a script for automatically generating the date when they fill out the form and then maintaining that specific date once signed?