Following Material docs, I:
import {MdDatepickerModule} from '@angular/material';
in root module and added it in providers list, but coudln't use it in template. Got this error:
Uncaught (in promise): Error: MdDatepicker: No provider found for DateAdapter. You must import one of the following modules at your application root: MdNativeDateModule, or provide a custom implementation.
So according to it, I removed last import and added:
import {MdNativeDateModule} from '@angular/material';
And now, looks like, it works. Why Material docs tells to import MdDatepickerModule
, but not MdNativeDateModule
? And how they differ?