-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Datepicker: Year selection mode doesn't work with years before 1986 #9534
Comments
Hi there in any case that it might be usefull, some of the device were having the same kind of weird issue. We fixed it by fixing the locale in the constructor in english, following the french exemple in the doc as per 👍 providers: [
this.adapter.setLocale('en'); |
Hi @anymos The |
That workaround works because the bug is caused by the way DST is handled, and different locales have different DST rules. The real fix is to convert the dates to UTC for consistency before formatting. (coming in #10068) |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Select year before 1986 correctly through "year selection mode", implemented in #8565
What is the current behavior?
The year 1985 is missing, so when you select any year before 1986, it selects a year later, for example, when you select 1981, datepicker selects 1982.
What are the steps to reproduce?
The issue can be observed on Material docs, https://material.angular.io/components/datepicker/overview
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 5.1.3
Material: 5.1.0
OS: Windows 7
TypeScript: 2.6.2
Browsers:
Is there anything else we should know?
On IE 11, the behavior is correct.
The text was updated successfully, but these errors were encountered: