Expand my Community achievements bar.

SOLVED

AEM cq dialog with datetime as xtype saves unparseable date “Y-4-21\\P20:i:0.000P”

Avatar

Level 4

As part of scheduled process, we need to accept user input date time with timezone in a cq dialog for a workflow to later read and wait until using absolute time handler and execute a process.

But some period of time we get unparseable date "Y- 4-21\P20:i:0.000P" error as we are expecting a date in "yyyy-MM-dd'T'HH:MM:ss.SSS Z"

and we do get a date as  "2017-04-21T20:05:00.000+05:30" for the other period of time.

The error doesn't happen all the time, we are using cq dialog with xtype datetime

In widgets api CQ.form.DateTime we find,

hiddenFormat : String Format of datetime used to store value in hidden field and submitted to server (defaults to 'Y-m-d\TH:i:sP' ).

Tried few format as value to dateFormat : String Format of DateField. (defaults to CQ.Ext.form.DateField.prototype.format)

Please suggest what can be done to handle this in a better way. Or how can we store date using cq dialog in efficient way to handle timezones and which format.

1 Accepted Solution

Avatar

Correct answer by
Level 4

This seems to be an environment issue, restarting the instance resolves the issue.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

This seems to be an environment issue, restarting the instance resolves the issue.