Copy link to clipboard
Copied
Hey,
I would like to create a form where people can insert the date in a textfield or datefield as DDMMYYYY (without any dots or slashes). It should be printed as DD.MM.YYYY. I habe absolutely no idea how i could manage this. Thanks for your help!
Serion
Copy link to clipboard
Copied
Hi,
See this guidance to get familiarized: https://helpx.adobe.com/acrobat/using/pdf-form-field-properties.html
Right-click on the date field that you want to format and select the Format tab.
From the dropdown menu select Date, then custom.
Click OK when you're done.
Copy link to clipboard
Copied
Hey,
thanks for your help. I tried it like this. It accepts the input as DDMMYYYY, but the output is exact the same. I want the input of the users to be like DDMMYYYY and the output in the form should be DD.MM.YYYY. Sorry if my description was not clear enough.
Serion
Copy link to clipboard
Copied
So you want the input format to be different from the output format? What you want is possible, but to do this requires some custom work beyond what Acrobat can do with the built-in date functons.
Acrobat uses JavaScript functions to restrict the user input with a Keystroke event and control the output with a Format event. You'll need to set these up with custom code, unfortunately the code that Acrobat uses won't work exactly for you, because these fucntions expect the input format to be the same as the output format. But you can modify thier code to do what you want .
These functions are:
AFDate_FormatEx("dd.mm.yyyy");
AFDate_KeystrokeEx("ddmmyyyy");
Be warned, this is an advanced programming task.
Copy link to clipboard
Copied
Hi Thom,
Any idea where I can find some documentation on these functions?
I've been trawling through the Java script reference, but can't find them.
I have a simillar issue - I'm using the built in date picker, but I need the user to be able to enter their date with, or without, dashes.
Adding customs validations doesn't work - the order of validation is the date picker, then your own custom one.
Any help would be greatly appreciated.
All the best.
Copy link to clipboard
Copied
If you want to enter dates without dots, slashes...etc, go to field properties ⇾ Format tab, select Date and scroll all the way down and select 'Custom' now enter date you wish (for example: ddmmyyyy).
Copy link to clipboard
Copied
Those built-in Acrobat date functions are not documented. But if you want to see what they do, just type the function name into the console window, without the parentheses, and press Ctrl-Enter. Executing a function name, by itself, will print the contents of the function.
Copy link to clipboard
Copied
I am trying to do the same thing, I want my clients to type in MMDDYYYY but I want it to output: "MM/DD/YYYY" or at least "MM DD YYYY"
and then I can add in the //'s later. I am wildly surprised this isn't an option, I do this all the time as a client on other apps. I think a workaround would be make 3 separate text fields and let the user bounce from MM to DD to YYYY on their own, and I will create static "/"'s on my own in between them.
Copy link to clipboard
Copied
Try this as custom format script:
if (event.value.length == 8) {
event.value = event.value.substring(0,2) + "/" + event.value.substring(2,4) + "/" + event.value.substring(4);}
Copy link to clipboard
Copied
This is INSANE. I have spent 1/2 hour trying to use Google, Adobe website, and Abobe AI in "Pro" to change Request e-signature date UK default from UK to USA. HINT: My setting are EST USA and inches so I want USA mm/dd/year NOT dd/mm/year. I FINALLY figure it out on my own. When you drag Date into document, right click within box, and Date Format is option. Thanks for making me think I have to do advance scripting (below my input at this point)
Copy link to clipboard
Copied
Hi @perfect_Glow1265 ,
For the clarity of other Adobe community members (or first time visitors) that may come accross this old discussion, I believe it was originally answered based on how to customize a date format in Adobe Acrobat Pro DC full desktop version, without using e-Signatures or Acrobat Sign while sending and requesting e-Signatures.
If that is what you are referring to, below is the appropriate guidance that took you half an hour to figure out on your own:
NOTE:
If you truly meant your appreciation for "making me think", check out these other insightful discussions about date and time while editing PDF documents using Adobe Acrobat Pro DC (not the Acrobat Sign add-on):
Copy link to clipboard
Copied
😉
Find more inspiration, events, and resources on the new Adobe Community
Explore Now