how to use date time picker to select particular time and display the time selected in the front end in HH:MM:SS format | Community
Skip to main content
New Participant
November 9, 2021
Solved

how to use date time picker to select particular time and display the time selected in the front end in HH:MM:SS format

  • November 9, 2021
  • 3 replies
  • 2510 views

Hi,

 

Our requirement is to provide a time window for the user to access a offer how can i achieve this functionality using AEM component. kindly suggest.

 

Thanks in advance  

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Kiran_Vedantam
New Participant
November 10, 2021

Hi @kattakiran1990 

 

Here is the xml code for you

 

<createdDate
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/datepicker"
allowBulkEdit="{Boolean}true"
displayedFormat="MM/DD/YYYY HH:mm:ss"
disabled="{Boolean}true"
displayTimezoneMessage="{Boolean}true"
fieldLabel="Created Date"
fieldDescription="MM/DD/YYYY"
name="./jcr:created"
type="date"/>

 

Hope this helps!

 

Thanks,

Kiran Vedantam.

Vijayalakshmi_S
New Participant
November 9, 2021

Hi @kattakiran1990,

You can use the type as datetime or time and control the formatting in HTL (as you might have issues in persistence when using valueFormat as HH:mm:ss)

In HTL : ${'HH:mm:ss' @ format = properties.date}

Bhuwan_B
Bhuwan_BAccepted solution
New Participant
November 9, 2021