Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Date format not getting applied in PDF form?

New Here ,
Jun 22, 2017 Jun 22, 2017

Hi,

I'm trying to add a custom date input field to a pdf. I've started by creating a text field, and specified my desired font, alignment, and date format (a custom format, "LIVE: m/d"). When I preview it in acrobat, the formatting gets auto-applied. In other words, if I type in, "June 22", it automatically switches to "LIVE: 6/22" as intended.

However, when I save the PDF and open it again, the date format is lost; it essentially becomes a free-text field. Everything else (font color/style and alignment) is preserved. Am I missing something?

Thank you!!

TOPICS
Create PDFs
3.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 22, 2017 Jun 22, 2017

Can you post the JavaScript actions you are using for the Custom Keystroke, Custom Format, Validation, Calculation or other action you are entering?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 23, 2017 Jun 23, 2017

Hi there, I'm just going into the "Text field properties" dialogue, Format tab. Selecting Date, then Custom, then entering "LIVE: m/d".

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 23, 2017 Jun 23, 2017

If I type in June 14, 2017 it seems to work even after saving, closing the form and closing Acrobat DC.

Date format get tricky when the month day and year are not included in the entry. There are 25, 26, or 100 occurrences for a any date with a century. The custom format only affects the displayed value but the underlying date string is still validated as a valid JavaScript date. So one probably should not enter the displayed value but a valid date including the month day and 4 digit year.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 26, 2017 Jun 26, 2017
LATEST

Thank you for your help. I'm having trouble understanding what you mean.. can you explain in layman's terms? 😉

To be clear, the formatting does get applied after I define a format that uses month and day. I close out "Text field properties", and preview the functionality, and everything works great--there's even a date picker next to the field. However, after I close Acrobat, and open the PDF, the field literally becomes a free text field, with no date formatting of any kind. And the date picker is gone too. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines