title: Angular material: MatDatepicker: No provider found for DateAdapter
body: <p>I'm trying to use the Datepicker component in Angular Material. Here is my HTML code:</p>
  
  <pre><code>&lt;input matInput [matDatepicker]="picker" placeholder="Choose a date" disabled&gt;
  &lt;mat-datepicker #picker disabled="false"&gt;&lt;/mat-datepicker&gt;
  </code></pre>
  
  <p>However, it's not working for me and I'm getting the following error:</p>
  
  <blockquote>
    <p>Error: MatDatepicker: No provider found for DateAdapter.</p>
  </blockquote>
  
  <p>The error message tells me that I need to import MatNativeDateModule as well as MatDatepickerModule but I have done that. Here is my import code below from app.module.ts:</p>
  
  <pre><code>import {
      MatFormFieldModule,
      MatMenuModule,
      MatCheckboxModule,
      MatIconModule,
      MatDatepickerModule,
      MatNativeDateModule
  } from '@angular/material';
  </code></pre>
  
  <p>Is there anything else I'm missing?</p>