title: Angular Material - Form is getting invalid, when mat datepicker model value is less than min date
body: <p>I am using mat datepicker on my form. I am inserting some records. This works fine with form validation. But when the same record I am trying to update, then my form show invalid. This is due to the date is invalid.</p>
  
  <p><strong>Case when form shows invalid - When min date is greater than model value.</strong></p>
  
  <p>Why this is happening? Is this default behaviour? How to make it work?</p>
  
  <p><strong>component.html</strong></p>
  
  <pre><code> &lt;form class="form-container" #pointAllocationForm="ngForm" (ngSubmit)="onSubmit()"&gt;
  
  &lt;mat-form-field class="example-full-width"&gt;
    &lt;div class="start-date"&gt;
          &lt;label class="required"&gt;&lt;strong&gt;Start Date : &lt;/strong&gt;&lt;/label&gt;
          &lt;mat-form-field&gt;
            &lt;input matInput [matDatepicker]="startDatepicker" [min]="minDate" placeholder="Choose a date" name="StartDate"
              [(ngModel)]="myDate" #StartDate="ngModel" (ngModelChange)="setEndDate($event)" required&gt;
            &lt;mat-datepicker-toggle matSuffix [for]="startDatepicker"&gt;&lt;/mat-datepicker-toggle&gt;
            &lt;mat-datepicker #startDatepicker&gt;&lt;/mat-datepicker&gt;
            &lt;mat-error *ngIf="StartDate.invalid &amp;&amp; (StartDate.dirty || StartDate.touched)"&gt;Please enter a valid date.&lt;/mat-error&gt;
          &lt;/mat-form-field&gt;
        &lt;/div&gt;
  &lt;/mat-form-field&gt;
         &lt;button class="btn btn-success" type="submit" [disabled]="pointAllocationForm.invalid"&gt;
            Update Points &lt;/button&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>component.ts</p>
  
  <pre><code>import {Component} from '@angular/core';
  
  
  @Component({
    selector: 'datepicker-min-max-example',
    templateUrl: 'datepicker-min-max-example.html',
    styleUrls: ['datepicker-min-max-example.css'],
  })
  export class DatepickerMinMaxExample {
    minDate = new Date();
    myDate = new Date(2018, 9, 10);
  }
  </code></pre>