Copy link to clipboard
Copied
Any suggestions please.....
I have inserted a date/time field into my form using Adobe Creative Cloud/Adobe Acrobat Pro DC and when I create the field it shows the right time but when I go into the form and select today's date the shows the date correctly but the time remains at 8.22am regardless of what the time actually is....I waited several hours and tried again and the time on the form still remains as 8.22am - see below
many thanks
Heather

Copy link to clipboard
Copied
If you want to update the field's value when you click it use this code as its OnFocus script:
event.target.value = util.printd("m/d/yyyy h:MM tt", new Date());
Copy link to clipboard
Copied
[moved from Adobe Creative Cloud to PDF Forms]
Copy link to clipboard
Copied
Your format assumes both date and time as entry values, using the date picker only modifies the date, to update the time one needs to go back and edit the time or manually enter both the date and time. You could use a script to automatically change the time to the system's time but this would prevent the full manual entry of the date time.
If you need to update both the date and time, I would use 2 separate fields, one the date and one for the time, and then either create a field of the combined values or combine the values in a script.
Copy link to clipboard
Copied
You must enter the time with the keyboard.
Copy link to clipboard
Copied
It's just an example, it's not the actual value of the field.
Copy link to clipboard
Copied
If you want to update the field's value when you click it use this code as its OnFocus script:
event.target.value = util.printd("m/d/yyyy h:MM tt", new Date());
Copy link to clipboard
Copied
Thanks - tried this but still can't get it to work
Copy link to clipboard
Copied
You'll need to provide more details if you want further help.
Copy link to clipboard
Copied
Excellent news!!!!...I now have it working Gilad - thank you for your help
cheers
Heather
Find more inspiration, events, and resources on the new Adobe Community
Explore Now