Skip to content

Commit 2b29c93

Browse files
Nevaanjosephperrott
authored andcommitted
fix(datepicker): add minDate and maxDate validation in demo-app (#12531)
1 parent b5d4bb0 commit 2b29c93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/demo-app/datepicker/datepicker-demo.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ <h2>Options</h2>
1717
<mat-form-field color="accent">
1818
<mat-label>Min date</mat-label>
1919
<input matInput [matDatepicker]="minDatePicker" [(ngModel)]="minDate"
20-
[disabled]="inputDisabled">
20+
[disabled]="inputDisabled" [max]="maxDate">
2121
<mat-datepicker-toggle matSuffix [for]="minDatePicker"></mat-datepicker-toggle>
2222
<mat-datepicker #minDatePicker [touchUi]="touch" [disabled]="datepickerDisabled"></mat-datepicker>
2323
</mat-form-field>
2424
<mat-form-field color="accent">
2525
<mat-label>Max date</mat-label>
2626
<input matInput [matDatepicker]="maxDatePicker" [(ngModel)]="maxDate"
27-
[disabled]="inputDisabled">
27+
[disabled]="inputDisabled" [min]="minDate">
2828
<mat-datepicker-toggle matSuffix [for]="maxDatePicker"></mat-datepicker-toggle>
2929
<mat-datepicker #maxDatePicker [touchUi]="touch" [disabled]="datepickerDisabled"></mat-datepicker>
3030
</mat-form-field>

0 commit comments

Comments
 (0)