material icon indicating copy to clipboard operation
material copied to clipboard

datepicker: date added via input has different behavior in Chrome and IE

Open petrovic-ivan opened this issue 7 years ago • 1 comments

I don't have plunker example but you can reproduce here: https://material.angularjs.org/latest/demo/datepicker

When I manually enter this date '1/9/18' into DatePicker it has different behavior in IE and Chrome. In chrome it will create '1/9/2018' date but in IE will create '1/9/1918'.

What is the expected behavior?

I would like to see that IE creates '1/9/2018'.

What is the current behavior?

IE creates '1/9/1918'.

petrovic-ivan avatar Jan 25 '18 18:01 petrovic-ivan

This needs to be investigated, but this may simply be an issue with how the different browsers handle dates.

You may be able to work around this by using MomentJS to parse your dates as demonstrated in the docs.

Splaktar avatar Feb 11 '18 07:02 Splaktar