AEM Datepicker value format

Avatar

Avatar
Validate 1
Level 2
ajinkayk6258253
Level 2

Likes

10 likes

Total Posts

39 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
ajinkayk6258253
Level 2

Likes

10 likes

Total Posts

39 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
ajinkayk6258253
Level 2

13-09-2019

Hi All,

I'm using datepicker coral ui component in my component. but the data that bydefault it stores in "2019-09-13T10:08:21+00:00" format. but as per over requirement we need to save it in "2019-09-13T10:08:21Z" format. both formats are iso-8601 format. i have tried valueformat & displayformat property all in vain?? is there anything that im missing? or we need to write custom code to change the format.

Replies

Avatar

Avatar
Give Back 5
Employee
yanirac19051392
Employee

Likes

20 likes

Total Posts

38 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 5
View profile

Avatar
Give Back 5
Employee
yanirac19051392
Employee

Likes

20 likes

Total Posts

38 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 5
View profile
yanirac19051392
Employee

13-09-2019

ajinkayk62582531​ perhaps overlay [1] and customize to whatever format you want to be displayed.

[1] /libs/cq/ui/widgets/source/ext/override/locale/ext-lang-cq.js

Avatar

Avatar
Ignite 1
Employee
JohnBunker
Employee

Likes

8 likes

Total Posts

17 posts

Correct reply

5 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back
Boost 5
View profile

Avatar
Ignite 1
Employee
JohnBunker
Employee

Likes

8 likes

Total Posts

17 posts

Correct reply

5 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back
Boost 5
View profile
JohnBunker
Employee

13-09-2019

I tried the valueFormat "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" which works in that it uses the "Z" in the saved value like this "2019-09-20T05:15:00.000Z". But when the ".SSS" is removed it does not work as you have noted (using "YYYY-MM-DD[T]HH:mm:ss[Z]" for valueFormat results in "2019-09-20T05:15:00.000-07:00").

If you can accept the milliseconds in the format, this may work you.