components icon indicating copy to clipboard operation
components copied to clipboard

Datepicker selects the wrong date

Open savatware opened this issue 9 years ago • 3 comments

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Datepicker always selects the correct date

What is the current behavior?

If you select a date like 10/10/1995 in the popup, it will actually select as value 10/9/1995 Although strangely enough selecting 10/10/1996 happens just fine

What are the steps to reproduce?

See: http://plnkr.co/edit/7aH7SRuQAKs6Qe15PBzK?p=preview

savatware avatar May 16 '17 12:05 savatware

Dupe of #4358, read https://github.com/angular/material2/issues/4358#issuecomment-299661961

You need to write your own adapter along with your own parser, or use something third party, like momentjs (which is the only lib I'm aware of being able to parse properly).

date-fns will support parsing eventually and is much smaller than momentjs, but it doesn't at the moment.

fxck avatar May 16 '17 13:05 fxck

See #4358

jelbourn avatar May 18 '17 23:05 jelbourn

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.