When creating angular 15.0.4 project then added angular material from cli command. Steps to reproduce bug(angular 15.0.4)
- ng new sample_project
- ng add @angular/material (indigo-pink.css)
- added MatFormField and MatInputModule in NgModule
See this updated Stackblitz for a working example.
CodePudding user response:
You can use this;
<mat-datepicker-toggle matIconSuffix> <mat-icon matDatepickerToggleIcon>access_time</mat-icon> </mat-datepicker-toggle>
but if you want action on click use this;
<mat-datepicker-toggle matIconSuffix [for]="picker"> <mat-icon matDatepickerToggleIcon>access_time</mat-icon> </mat-datepicker-toggle> <mat-datepicker #picker></mat-datepicker>