This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
calendar, datepicker: when local tz is GMT+X, using ng-model-options to specify the tz causes previous day to be selected #12000
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
Demo URL (required)*: https://material.angularjs.org/1.1.24/demo/datepicker#ng-model-options-timezone
Detailed Reproduction Steps
Explain the expected behavior
The behavior should be the same as for a GMT-5:00 timezone. The UTC time should be midnight and the UTC date should be the date clicked.
Explain the current behavior
The behavior is not the same as for a GMT-5:00 timezone. The UTC time is midnight and the UTC date is 1 day before the date clicked.
Discuss the use-case or motivation for changing the existing behavior
Correctness.
List the affected versions of AngularJS, Material, OS, and browsers
Add anything else we should know
There is an issue where the stand-alone calendar and calender in a datepicker, when a date is clicked on (in a GMT+X timezone when using
ng-model-options="{timezone: 'UTC'}"
), selects the previous date:In this case, 6/19 is manually clicked upon in the stand-alone calendar and calender in the datepicker:
In a GMT-X timezone, this works fine:
The text was updated successfully, but these errors were encountered: