Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting ngModelOptions timezone to UTC results in incorrect calendar picker date #216

Open
jonathon-oodar opened this issue Nov 17, 2017 · 1 comment

Comments

@jonathon-oodar
Copy link

If the datetime-picker is instantiated with ng-model-options={ timezone: 'UTC' } and a date is passed, the date will display correctly in the input field but the wrong date square may be highlighted in the calendar picker depending on the time and the local time zone.
E.g. my local time zone is +11:00 at the moment, if I create the datetime-picker and set the model to a time earlier than 11am, the calendar picker will select the previous day.

I've created a plunker that demonstrates this here: http://plnkr.co/edit/t4LzL2LiEkXwqBWfpVOT?p=preview
The initial date set to the model is Nov 17th 2am, equivalent to (here): Nov 17 2017 13:00:00 GMT+1100

image

@Gillardo
Copy link
Owner

I believe this is working, as i cannot get the wrong date is appear? Can you also try the latest version released today 2.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants