title: Angular Material 2 - MatDatePicker Error - 'Must import MatNativeDateModule/MatMomentDateModule'
body: <p>I'm trying to momentjs to format dates in my component controllers where matInput datepicker components are used, but I'm getting the following error in the console when I try to load pages where these are present:</p>
  
  <blockquote>
    <p>Error: MatDatepicker: No provider found for DateAdapter. You must import one of the following modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a custom implementation.</p>
  </blockquote>
  
  <p>Problem is that I've tried including this in my app module, main app component and child components where I'm trying to reference the <code>moment()</code> method, but I still get the error. I've also tried using MatNativeDateModule with the same result.</p>
  
  <p>This is the module dependency that I'm importing:</p>
  
  <pre><code>import { MatMomentDateModule } from '@angular/material-moment-adapter';
  </code></pre>
  
  <p>Datepicker element:</p>
  
  <pre><code>&lt;input matInput [matDatepicker]="invoiceDate" [max]="maxDate" name="date" placeholder="DD/MM/YYYY" formControlName="date"&gt;
  </code></pre>