I have a requirement to show the dates for start date and end date i.e., if the start date is dd/mm/yyyy format 10/09/2020 and end date should be till yesterday i.e., 09/09/2020 and all the remaining dates should be disabled.
How can I achieve this?
<mat-form-field color="accent" appearance="fill">
<mat-label>Start Date</mat-label>
<input matInput [matDatepicker]="picker1" [max]="tomorrow" [formControl]="startDate">
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker #picker1></mat-datepicker>
</mat-form-field>
<mat-form-field color="accent" appearance="fill">
<mat-label>End Date</mat-label>
<input matInput [matDatepicker]="picker2" [min]="today" max="tomorrow" [formControl]="endDate">
<mat-datepicker-toggle matSuffix [for]="picker2"></mat-datepicker-toggle>
<mat-datepicker #picker2></mat-datepicker>
</mat-form-field>
[min]and[max]property: material.angular.io/components/datepicker/…