title: Angular Material datepicker value format
body: <p>I have a Datepicker input like this:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;mat-form-field class="example-full-width"&gt;
      &lt;input #startDate matInput [matDatepicker]="picker" (dateInput)="first($event.value)" placeholder="Enter 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>When the input changes, the <em>first</em> funtion receives the <code>$event.value</code> date in this format:</p>
  
  <blockquote>
    <p>Tue Apr 09 2019 00:00:00 GMT+0200</p>
  </blockquote>
  
  <p>And I need this one (AAAA-MM-DD):</p>
  
  <blockquote>
    <p>2019-04-09</p>
  </blockquote>
  
  <p>Is there any way to change the Datepicker's output value whitout parsing it by hand? Thanks.</p>