Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

No timezone information in DateTime dialog

Avatar

Level 6

Hi,

I have a small question about the DateTime widget (http://dev.day.com/docs/en/cq/current/widgets-api/index.html?class=CQ.form.DateTime).

When we use it in a dialog, it automatically adds the time zone of the browser/user into the field. How do I avoid that?

/Ove

1 Accepted Solution

Avatar

Correct answer by
Level 10

CQ widgets can be extended/customized. You can change that widget to meet your business needs. 

See: http://dev.day.com/docs/en/cq/current/developing/widgets.html.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

CQ widgets can be extended/customized. You can change that widget to meet your business needs. 

See: http://dev.day.com/docs/en/cq/current/developing/widgets.html.

Avatar

Level 7

This is caused by the fact that DateTime field Widget is using the EXTJs date library (Date.js) which has this behaviour as a default.
And as Scott said, the only way to avoid that is to overlay the standard widget or create you own, it should be possible to return the value without the user/browser time zone. 
JCR is though, as far as i know, limited to store dates strictly in ISO8601 so it might not be possible to go overboard with the creativity in the overlay/custom widget there, but as long as one follows that it should be ok smiley

 

Avatar

Level 6

Good answers. In the end, we realized that we can blissfully ignore the time zone information.

/Ove