Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Regression with handling of ng-model-options timezone option #6105

Closed
antch opened this issue Jul 20, 2016 · 2 comments
Closed

Regression with handling of ng-model-options timezone option #6105

antch opened this issue Jul 20, 2016 · 2 comments

Comments

@antch
Copy link

antch commented Jul 20, 2016

Bug description:

When using datePickerPopup with a Date model, and ng-model-options.timezone set to UTC, the model is still being handled in the browser timezone. This case seems to be working properly in v1.3.3.

Link to minimally-working plunker that reproduces the issue:

http://plnkr.co/edit/n8j5znnVRbjHK0PlaNYw?p=preview

Note that the model is set to 1/1/2016 midnight UTC, yet the picker displays 12/31/2015 (if browser is behind UTC).
In addition, if you select new dates from the popup, the UTC label display above is mismatched from the date on the datepicker.

If you change the version of ui-bootstrap in the plunk from 2.0.0 to 1.3.3, the date correctly shows as 1/1/2016.

Version of Angular, UIBS, and Bootstrap

Angular: 1.5.x
UIBS: 2.0.0
Bootstrap: 3.2.x

@icfantv
Copy link
Contributor

icfantv commented Jul 20, 2016

I spoke with @antch on Gitter and asked him to open this. I confirmed this is a regression.

@wesleycho
Copy link
Contributor

Thanks for this - I will look into this within the next couple of days in depth. This appears to be a regression due to the separation of ngModelOptions configuration between the popup and inline datepickers.

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

Successfully merging a pull request may close this issue.

3 participants