Closed astynax777 closed 7 years ago
I believe you need to import MdNativeDateModule
or manually provide DateAdapter
and MD_DATE_FORMATS
Importing MdNativeDateModule did remove the error, however the datepicker is not popping up. Here is my markup:
<div>
<md-input-container>
<input mdInput [mdDatepicker]="datePicker" placeholder="Select a Date" />
<button mdSuffix [mdDatepickerToggle]="datePicker"></button>
</md-input-container>
<md-datepicker #picker></md-datepicker>
</div>
Is there anything else I'm missing to make the picker pop up?
[mdDatepicker]="datePicker"
and [mdDatepickerToggle]="datePicker"
must be ="picker"
as you say in <md-datepicker #picker></md-datepicker>
.
You're right... stupid mistake! It works now. Thanks a bunch guys.
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.
I've been going through the material directives attempting to get acquainted with Angular/Material2 and everything was working great until I added the MdDatepickerModule. If I remove the MdDatepickerModule there is no error and everything else works. Forgive my ignorance if this is a simple error, but all my research on StackOverflow seems to indicate the error is due to an improper import or circular reference. My import seems correct, so I'm wondering if you guys can tell me.
Bug, feature request, or proposal:
Bug?
What is the expected behavior?
No error
What is the current behavior?
Error:
What are the steps to reproduce?
Here is my app.module.ts
Here's my package.json
and my tsconfig.json
I'm working in VS 2015 debugging in Chrome.