title: Min Date and Max Date not working Angular Material Range Input
body: <p>I have this simple form which is a range input from angular material. But the [min] and [max] date are not working. I tried to put in the first input, the second input and then both of them, but nothing works. I leave my code</p>
  <pre><code> &lt;mat-form-field appearance=&quot;outline&quot; class=&quot;w-100&quot;&gt;
          &lt;mat-date-range-input [rangePicker]=&quot;picker&quot; &gt;
            &lt;input matStartDate placeholder=&quot;Start date&quot; formControlName=&quot;start&quot; [min]=&quot;minDate&quot; 
             [max]=&quot;maxDate&quot;&gt;
            &lt;input matEndDate placeholder=&quot;End date&quot; formControlName=&quot;end&quot; [min]=&quot;minDate&quot; 
             [max]=&quot;maxDate&quot;&gt;
          &lt;/mat-date-range-input&gt;
          &lt;mat-datepicker-toggle matSuffix [for]=&quot;picker&quot;&gt;&lt;/mat-datepicker-toggle&gt;
          &lt;mat-date-range-picker #picker&gt;&lt;/mat-date-range-picker&gt;
        &lt;/mat-form-field&gt;
  </code></pre>
  <p>I'm trying to get the max to be the same day, I mean today.</p>
  <pre><code>export class DateComponent implements OnInit, {
    minDate: Date;
    maxDate: Date;
   constructor(private formBuilder: FormBuilder) {
      const currentYear = new Date().getFullYear();
      this.minDate = new Date(currentYear - 20, 0, 1);
      this.maxDate = new Date();
      }
  }
  </code></pre>
  <p>But it's not working.</p>