Last active
November 23, 2018 19:51
-
-
Save TLiu2014/4d285dd4edc7676531252e5d5bf476bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form #datePickerForm> | |
<mat-form-field> | |
<input matInput [min]="minDate" [matDatepicker]="picker" placeholder="Choose a date" #pickerInput [formControl]="date"> | |
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> | |
<mat-datepicker #picker></mat-datepicker> | |
<mat-error *ngIf="date.invalid">{{getErrorMessage(pickerInput.value)}}</mat-error> | |
</mat-form-field> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment