This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
datepicker: with UTC timezone set doesn't handle time offset +2:00 #12028
Labels
has: Pull Request
A PR has been created to address this issue
i18n: localization
This issue is related to internationalization
P2: required
Issues that must be fixed.
resolution: fixed
type: bug
Milestone
Bug
Demo and steps to reproduce the issue
Detailed Reproduction Steps (With user interaction)
ng-model-options
to{timezone:'UTC'}
See demo url (1)
Detailed Reproduction Steps (Without interaction)
This step is a bit harder to reproduce as it seems to depend on what is loaded in the view. I've been able to reproduce this in the example for timezone settings at https://material.angularjs.org/latest/demo/datepicker, I've copied the demo to codepen where it seems to appear as long as the calendar is loaded together with the datepicker. I've also experienced this issue without any calendar being loaded in the view.
ng-model-options
to{timezone:'UTC'}
Any selection of a date will update the time offset properly.
Removing the calendar will prevent the problem from occurring.
See demo url (2)
Explain the expected behavior
Time for the date should not be affected when opening or loading the datepicker.
Explain the current behavior
When setting an initial date the time part of the date will be affected when either opening up the datepicker and closing it or during the initial load of the datepicker in some scenarios. This is not expected bahavior.
Discuss the use-case or motivation for changing the existing behavior
The current behavior is unexpected and may lead to an invalid date being selected when using the datepicker component.
List the affected versions of AngularJS, Material, OS, and browsers
Add anything else we should know
Screenshots
When opening the datepicker
During first load
After a date is selected after first load the time offset is updated correctly
The text was updated successfully, but these errors were encountered: