Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Set Time Field to accept single-digit entries

Avatar

Level 1

How can I set the Edit Pattern in the Date/Time Field to accept single-digit entries?  If I type "1" in the field, all I see displayed is "1"; I must type two (2) digits in order to see the time format displayed.  I want to be able to type a single digit and still receive the time format.

3 Replies

Avatar

Level 1

The Display Pattern was set to "time{h:MM}"; I attempted to set the Edit Pattern to the same thing, but it was tagged as invalid.  I used "time{H:MM}" in both the Display Pattern and Edit Pattern, and it was accepted as valid in both; however, single-digit entries still yield the same thing.

Avatar

Level 1

Another way to ask the question would be, "Is there a way to keep from entering the leading zero when attempting to enter single hour times?"

For example, I can enter "01" to get the display to read "1:00".  Is there a way to keep from entering the leading zero to get the same result?