title: Angular material Datepicker get value on change
body: <p>I'm using the new version of angular and angular material. I need to get the value of the <code>datepicker</code> at the moment the user change the date to then pass that value to a function and do something.</p>
  
  <p><strong>datepicker</strong></p>
  
  <pre><code>  &lt;mat-form-field&gt;
      &lt;input matInput [matDatepicker]="picker" placeholder="Choose a date" [(ngModel)]="roomsFilter.date"&gt;
      &lt;mat-datepicker-toggle matSuffix [for]="picker"&gt;&lt;/mat-datepicker-toggle&gt;
      &lt;mat-datepicker #picker [(ngModel)]="roomsFilter.date" ngDefaultControl (selectedChanged)="onChange($event)"&gt;&lt;/mat-datepicker&gt;
    &lt;/mat-form-field&gt;
  </code></pre>
  
  <p>and this the function.</p>
  
  <pre><code>  public onChange(event: any, newDate: any): void {
      console.log(event.target.value);
      // this.getData(newDate);
    }
  </code></pre>