Error: MatDatepicker: No provider found for DateAdapter. code example
Example 1: no provider for dateadapter unit test
imports: [
MatDatepickerModule,
MatNativeDateModule
],
providers: [
MatDatepickerModule,
],
Example 2: MatDatepicker: No provider found for DateAdapter. You must import one of the following modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a custom implementation
import {MatNativeDateModule} from '@angular/material';
Example 3: Mat Datepicker: No provider found for DateAdapter
@NgModule({
imports: [
MatDatepickerModule,
MatNativeDateModule
]
})