Setting default time in coral datepicker | Community
Skip to main content
Level 2
May 26, 2021
Solved

Setting default time in coral datepicker

  • May 26, 2021
  • 1 reply
  • 824 views

Hi All,

 

We have a requirement where client want to set the default time as 00:01 in the OOTB coral date picker component. We are using this component in Metadata schema forms.

AEM version :6.5.6

 

Could you help us in assisting as how this can be set or any property needs to be used.

 

Thanks,

Shikha

 

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

@shikhasharma-1 

You can set the date picker type to "datetime" and implement something as below with a default time value 00:01:

<coral-datepicker type="datetime" name="field" value="2021-05-27T00:01+05:30" valueformat="YYYY-MM-DD[T]HH:mmZ"...."> </coral-datepicker>

FYI- Any subsequent coral updates may break this implementation so direct change should be avoided unless urgent.

1 reply

Pulkit_Jain_
Adobe Employee
Pulkit_Jain_Adobe EmployeeAccepted solution
Adobe Employee
May 27, 2021

@shikhasharma-1 

You can set the date picker type to "datetime" and implement something as below with a default time value 00:01:

<coral-datepicker type="datetime" name="field" value="2021-05-27T00:01+05:30" valueformat="YYYY-MM-DD[T]HH:mmZ"...."> </coral-datepicker>

FYI- Any subsequent coral updates may break this implementation so direct change should be avoided unless urgent.