Want to save datepicker value to specific format (YY-MM-DD)

khamat_bn

22-06-2020

Hi Folks ,

 

I have used datepicker in the dialog and it's saving the values in 2020-06-22T00:00:00.000+05:30 like format. 

I want to save the date value in (YY-MM-DD) format.

I have used granite/ui/components/coral/foundation/form/datepicker.

 

 

 

AEM AEM 6.4 date and time field date picker

Accepted Solutions (1)

Accepted Solutions (1)

Theo_Pendle

MVP

22-06-2020

Hi @khamat_bn,

Yes, you can provide a format using the valueFormat property. See the docs here: https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/reference-materials/granite-ui...

Here is an example where I set the format to YYY-MM-DD. The datepicker node:

Selection_194.png

The resulting value saved in the field:

Selection_195.png

Answers (0)