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

Display format must align to the value inside the input field (when mouse is inside the input field)

New Here ,
Apr 15, 2025 Apr 15, 2025

Hello, 


Can anyone help me with my issue: 

 

For the Date Picker, I have option to fill out this field, either thru date picker or thru manual key in 

For Date Picker, there is no issue since the selected date is automatically formatted to 'dd mmm yyyy'. 

 

For Manual key-in, the user can input any other date format such as dd/mm/yyyy or dd-mm-yyyy, which I managed to handle and apply date format into 'dd mmm yyyy' however when you focus on the mouse inside the input field the value is still dd/mm/yyyy. I want to render the value (when the mouse is inside the field) into same as how it is displayed dd mmm yyyy. 

 

Manual key-in

roman_6352_0-1744772511161.pngexpand image

If the mouse is away the field, it renders to the correct format

roman_6352_1-1744772554664.pngexpand image

 

But when you go back inside the field, it's still dd/mm/yyyy

roman_6352_2-1744772587461.pngexpand image

 

Thank you in advance for the help. 

 

TOPICS
Create PDFs , Edit and convert PDFs , JavaScript , Modern Acrobat , PDF
104
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
Community Expert ,
Apr 15, 2025 Apr 15, 2025

When you try to leave the field in Preview Mode or Reader through clicking or tabbing, are you getting a validation warning like the below (note that I chose the default dd-mmm-yyyy format for field rather than your non-hyphenate version)?

 

 

 

 

- Author: InDesign Masterclass: Type & Tables, InDesign Masterclass: Text Techniques, ePublishing with InDesign. Consultant & Trainer: ID, IC, AI, PS, Au, PDF, #508 Accessibility
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 ,
Apr 15, 2025 Apr 15, 2025

Hello Pariah, 

There is no warning. By right, formats such as dd/mm/yyyy and dd-mm-yyyy are also acceptable, then I used custom script to format them to dd mmm yyyy as shown in the picture. However, when you focus the mouse inside the field, it's still dd/mm/yyyy instead of dd mmm yyyy

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
Community Expert ,
Apr 15, 2025 Apr 15, 2025

Ah. You wrote a custom script. If you remove the script, does it work?

If yes, then please provide the script here. Hopefully someone versed in Javascript for Acrobat can help.

 

 

- Author: InDesign Masterclass: Type & Tables, InDesign Masterclass: Text Techniques, ePublishing with InDesign. Consultant & Trainer: ID, IC, AI, PS, Au, PDF, #508 Accessibility
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
Community Expert ,
Apr 15, 2025 Apr 15, 2025
LATEST

A format script changes the way the value of the script looks, but not the actual value itself. So when the user enters the field (to edit the value) it shows the original value it has, not the formatted version. Therefore, if they entered the date dd-mm-yyyy, that's what will be shown when they go back to edit it later on. The calendar wizard applies the selected date in the actual pattern you selected, so there's no change when you go to edit it later on.

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