components icon indicating copy to clipboard operation
components copied to clipboard

[DatePicker] - using validation, reactive forms and initial value - Error date.getFullYear is not a function

Open alexandrupaul7 opened this issue 9 years ago • 1 comments

Bug, feature request, or proposal:

Bug

What is the expected behavior? To set a initial date to datepicker and also using validations in a reactive form.

What is the current behavior?

ERROR TypeError: date.getFullYear is not a function

What are the steps to reproduce? Using datepiker in conjunctions with reactive forms. Seting any validation ([min], [max] or filter) and trying to set a initial value for datetimepiker and error occurs. (ERROR TypeError: date.getFullYear is not a function)

Providing a Plunker (or similar) is the best way to get the team to see your issue.

https://plnkr.co/edit/5kioS1iWmT8fF7OIrTqP?p=preview

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

angular 4.2

Is there anything else we should know?

alexandrupaul7 avatar Jul 20 '17 11:07 alexandrupaul7

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.