Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Military Time Input Mask

Avatar

Level 2

I would like to have an input mask for military, or 24 hr time, such as HH:MM.  I noticed the Date/Time field, available in the Object Library does not have any input pattern for time (so why is it called "Date/Time"?).

Is there any way I can either edit the "Date/Time" field to accept a time pattern, or create my own?

3 Replies

Avatar

Level 7

Try

time{HH:MM}

in the patterns dialog (Pattern:)

Stephen

Avatar

Level 2

Thank you.

Is there a way to force a single digit to display the complete time?  for example, if I enter a 1, would the input mask be able to complete it(i.e. 01:00)?

Avatar

Level 7

Hi,

Make sure you have selected "Time" in the "Binding Tab" of the "Object Pallet".

Then use this in the patterns:

time{K:MM}

Good luck,

Stephen