I'm using angular date range picker and getting a issue:
Can't bind to 'rangePicker' since it isn't a known property of 'mat-date-range-input'.
I have added imports, exports, providers in app.module.ts too:
imports: [
MatNativeDateModule,
MatDatepickerModule,
FormsModule,
ReactiveFormsModule
],
exports:[
MatDatepickerModule,
MatNativeDateModule
],
providers: [
MatDatepickerModule,
MatNativeDateModule,
]
date range picker in html:
<mat-form-field appearance="fill">
<mat-label>Enter a date range</mat-label>
<mat-date-range-input [rangePicker]="picker">
<input matStartDate placeholder="Start date">
<input matEndDate placeholder="End date">
</mat-date-range-input>
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-date-range-picker #picker></mat-date-range-picker>
</mat-form-field>
Should I add any thing else in module.ts?
As I understand you have to have @angular/material": "^10.0.2 - not older