Copy link to clipboard
Copied
I am trying to change make a custom date and time to function as an "invoice number" so when the user chooses the date from the form Date field it populates as such: ddmmyy-hhmm. When I try to use the Custom format and type in ddmmyy-hhmm I get an error that reads
"Invalid date/time: please ensure that the date/time exists. Field [ Date of invoice creation ] should match format ddmmyy-hMM"
What am I doing wrong?try67​
Copy link to clipboard
Copied
You're stuck with these formats, I fear.
On Jan 13, 2018 12:28 AM, "SanitySolutionsDEN" <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Ready for an uh oh...?
So I put it in the Mouse up action of the button, but the 'acctingPO number' field doesn't update . How am I possibly this bad at Adobe Acrobat?! If you can't tell, I'm really into screenshots...
--
--
--
Copy link to clipboard
Copied
You forgot the part of the code that actually applies this value to the field in question:
this.getField("Field name").value = util.printf("%04d", Math.floor((Math.random() * 10000) + 1));
Copy link to clipboard
Copied
You think I would have figured that out by now...
YOU ARE AMAZING! You have totally saved me, taught me so much, and have been an unbelievably valuable resource.
Thank you again!
-N
Copy link to clipboard
Copied
I have encountered this issue as well, however this issue was not realted to any format or javascript but rather related to the size of the text field. If the text field I was using was not long enough to display the date/time in the custom format I selected, I would get the error you are experiencing.
My potential solution: Resize the text box. OR In the Text Field Properties, under the Options tab, check the "Scroll long text".
Hope this helps.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now