title: How to enable only specific dates in Angular 5?
body: <p>I have set of dates and I want to enable only those dates in <code>&lt;mat-datepicker&gt;</code>.</p>
  
  <pre><code>"ListOfDates": [
        {
           "startDate": "2018-01-01T08:00:00"
        },
        {
           "startDate": "2018-01-02T08:00:00"
        },
        {
          "startDate": "2018-01-03T09:00:00",
        }]
  </code></pre>
  
  <p>This is my html code:</p>
  
  <pre><code>&lt;mat-form-field&gt;
       &lt;input matInput
          [matDatepicker]="picker"
          [matDatepickerFilter]="dateFilter"
          placeholder="Choose a date"&gt;
       &lt;mat-datepicker-toggle matSuffix [for]="picker"&gt;&lt;/mat-datepicker-toggle&gt;
       &lt;mat-datepicker #picker&gt;&lt;/mat-datepicker&gt;
   &lt;/mat-form-field&gt;
  </code></pre>
  
  <p>In my <code>Component.ts</code> file:</p>
  
  <pre><code>@Component({...})
  export class SomeComponent.ts {
  
      dateFilter = (date: Date) =&gt; date.getDate()
  
  }
  </code></pre>
  
  <p>Can anyone help on this?</p>