I am getting below error when using Angular Material datepicker in Angular ag grid.
error NG8002: Can't bind to 'matDatepicker' since it isn't a known property of 'input'.
HTML Code:
I am getting below error when using Angular Material datepicker in Angular ag grid.
error NG8002: Can't bind to 'matDatepicker' since it isn't a known property of 'input'.
HTML Code:
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jithu ThomasPosted Jan 23, 2024, 4:45 AM
Make sure you have the following in your module file (e.g.,
app.module.ts):import { MatInputModule } from '@angular/material/input';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatIconModule } from '@angular/material/icon';
import { MatNativeDateModule } from '@angular/material/core';
// Other imports...
@NgModule({
declarations: [
// Your components and directives...
],
imports: [
// Other modules...
MatInputModule,
MatDatepickerModule,
MatIconModule,
MatNativeDateModule,
],
// ...
})
export class YourAppModule {}
Also make sure you have imported
MatDatepickerModule,MatInputModule,MatIconModule, andMatNativeDateModulefrom'@angular/material', and they are added to theimportsarray of your module.