title: Angular-Material set a Datepicker to only date in Angular7
body: <p>I am using Angular-7 for web portal application. I have a Material Datepicker from which I would like to only get date with no timestamp. Also it should be in this format: dd/mm/yyyy</p>
  
  <p>This is how it appears on the frontend:</p>
  
  <p><a href="https://i.stack.imgur.com/mVuRl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mVuRl.png" alt="datepicker"></a></p>
  
  <pre><code>&lt;div class="col-xs-6"&gt;
    &lt;label for="loading_date"&gt;Loading Date&lt;/label&gt;
    &lt;div class="input-group date"&gt;
      &lt;mat-form-field&gt;
        &lt;input matInput [matDatepicker] = "picker" placeholder = "Choose a date" name="loading_date" [(ngModel)]="quoteModel.loading_date" #loading_date="ngModel" [ngClass]="{'is-invalid' : loading_date.invalid &amp;&amp; ((loading_date.dirty || loading_date.touched) || quoteform.submitted)}"   required&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;
    &lt;div class="form-feedback" *ngIf="loading_date.invalid &amp;&amp; ((loading_date.dirty || loading_date.touched) || quoteform.submitted)"&gt;
    &lt;div style="color:red;" *ngIf="loading_date.errors?.required"class="alert alert-danger"&gt;Loading Date is required.&lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I When I submit into the database, I want to get a result in this format:</p>
  
  <blockquote>
    <p>2019-09-26</p>
  </blockquote>
  
  <p>But this is what I am getting: </p>
  
  <blockquote>
    <p>2019-09-26T23:00:00.000Z</p>
  </blockquote>
  
  <p>How do I achieve this?</p>