Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Setting default time in coral datepicker

Avatar

Level 2

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

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@sharms13 

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

@sharms13 

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.