Just trying to create a form with a date field. Setting a formText() format doesn't seem to do much. In Chrome and MacOS Preview the date field doesn't support or isn't prompted to show the date picker, and the format param isn't honoured. In Acrobat Reader there's a drop down date picker, but picking a date doesn't set the field value to display using the param format. Changing the year in the date picker doesn't show the date either. So I can have 2 dates from 2024 and 2023 and they're not displaying correctly.
"When needing to format the text value of a Form Annotation, the following options are available. This will cause predefined document JavaScript actions to automatically format the text. Refer to the section Formatting scripts in Acrobat Forms Plugin of the Acrobat SDK documentation for more information."
Code sample
I wasted enough time with repl.it accessing my GitHub account and it doesn't build a pdf correctly. Try this:
Nobody? Is this the extent of what PDF offers for date fields? Is there another correct date field or usage that'll unlock something similar to what typical browser offer?
Bug Report
Description of the problem
Just trying to create a form with a date field. Setting a formText() format doesn't seem to do much. In Chrome and MacOS Preview the date field doesn't support or isn't prompted to show the date picker, and the format param isn't honoured. In Acrobat Reader there's a drop down date picker, but picking a date doesn't set the field value to display using the param format. Changing the year in the date picker doesn't show the date either. So I can have 2 dates from 2024 and 2023 and they're not displaying correctly.
I'm not sure if I'm doing something wrong or what to expect. The docs don't set much in the way of expectations.
The pdfkit docs (https://pdfkit.org/docs/forms.html#text_field_formatting) Acrobat SDK link is broken as well:
"When needing to format the text value of a Form Annotation, the following options are available. This will cause predefined document JavaScript actions to automatically format the text. Refer to the section Formatting scripts in Acrobat Forms Plugin of the Acrobat SDK documentation for more information."
Code sample
I wasted enough time with repl.it accessing my GitHub account and it doesn't build a pdf correctly. Try this:
Your environment