Copy link to clipboard
Copied
I created some text form fields.
Is there a way to change the format of Form Field to Date format with Javascript?
Copy link to clipboard
Copied
Is there a particular reason why it has to be with JavaScript instead of using the built-in custom format options?
Are you just trying to grab the date from an actual date field and display that date as a text string in another text field object?
Copy link to clipboard
Copied
I have a Word document as a source file, this is converted to PDF and based on some conditions I create Form Fields in this PDF with addField method. So I would like to create a form field with date picker. According to my understanding it is a text field with format set to Date. I would like to do it in the same way as I can set e.g., Font type for Form Field with its textFont property.
I do not want to grab any value or copy it. Thanks
Copy link to clipboard
Copied
Doing so requires using a couple of undocumented methods, namely AFDate_FormatEx and AFDate_KeystrokeEx. Try searching the forums for them (or just google it in general) and hopefully you'll find some more documentation.
If you're interested, I've developed a (paid-for) tool that allows you to do it quickly and easily, without having to write any code. You can find it here: http://try67.blogspot.com/2012/06/acrobat-apply-format-to-multiple-fields.html