angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.37k stars 6.75k forks source link

DatePicker breaks upon using arrow for year at year 2008 #8295

Open echosalik opened 7 years ago

echosalik commented 7 years ago

Bug, feature request, or proposal:

Bug

What is the expected behavior?

To go to year 2008

What is the current behavior?

DatePicker breaks and skips 2008 and goes to 2007

What are the steps to reproduce?

IN IMPORT Material Datepicker, MAT_DATE_LOCALE,

IN PROVIDER {provide: MAT_DATE_LOCALE, useValue: 'en-GB'},

What is the use-case or motivation for changing an existing behavior?

To be able to select years before 2009 without bug. I'm using it in a DOB field

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.4.6 angular/material: 2.0.0-beta.12 Linux (+ Windows - could not reproduce for windows - don't know how to strike-through) TS 2.5.3 FF + Chrome

Is there anything else we should know?

Before 2008 http://tinypic.com/r/opwx7o/9

After 2008 http://tinypic.com/r/2z6tsh1/9

julianobrasil commented 7 years ago

You can provide an example code that fails here: https://stackblitz.com/edit/dialog-example

It helps the team to better understand your case.

echosalik commented 7 years ago

I'll provide a code soon in an hour or so. And sorry for the closing and reopening. Clicked the wrong button.

echosalik commented 7 years ago

Just noticed something. This doesn't happen on my home computer. Windows 10 64 bit. At work it was windows 7. Could that be an issue?

julianobrasil commented 7 years ago

Did you test it using the same browser in both cases?

mmalerba commented 6 years ago

@DragoTechInnovations have you been able to get a consistent reproduction of this issue?

echosalik commented 6 years ago

@mmalerba unfortunately no. I guess its related to linux, rather then Firefox or Chrome, because it works flawlessly on windows systems.

mmalerba commented 6 years ago

It seems to work fine on my linux machine. Is there anything notably different about how the date/time settings on the problem machine? (e.g. different time zone or something)

echosalik commented 6 years ago

Well, the timezone and date format is not US. Timezone is Karachi and Format is en-GB.

mmalerba commented 6 years ago

Ah I've managed to reproduce it with Firefox 57.0.1 on Linux with my timezone set to Karachi. Will look into it. I also verified that its only the NativeDateAdapter that has this issue. If you use the MomentDateAdapter it should work fine.

mmalerba commented 6 years ago

Looks like there is a similar breakdown in Kiev timezone around 1975

echosalik commented 6 years ago

@mmalerba Thanks, I'll try that on monday and let you know!