AEM cq dialog with datetime as xtype saves unparseable date “Y-4-21\P20:i:0.000P” | Community
Skip to main content
Level 3
Apr 22, 2017 9:35 AM UTC
Solved

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

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
akashdeepAEMAccepted solution
Level 3
Feb 12, 2018 7:25 PM UTC

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

1 reply

akashdeepAEMAuthorAccepted solution
Level 3
Feb 12, 2018 7:25 PM UTC

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

Translate