Typescript 物料日期选择器未在模式/弹出模式下工作

Typescript 物料日期选择器未在模式/弹出模式下工作,typescript,angular-material,uidatepicker,angular11,Typescript,Angular Material,Uidatepicker,Angular11,虽然我用过 从“@angular/material/datepicker”导入{MatDatepickerModule}; 以下是错误: ERROR Error: MatDatepicker: No provider found for DateAdapter. You must import one of the following modules at your application root: MatNativeDateModule, MatMomentDateModule, or pr

虽然我用过 从“@angular/material/datepicker”导入{MatDatepickerModule}; 以下是错误:

ERROR Error: 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.
    at createMissingDateImplError (datepicker.js:160)
    at new MatDatepickerInputBase (datepicker.js:3031)
    at new MatDatepickerInput (datepicker.js:3283)

您还需要在模块中导入
NativeDateAdapter
,您是否检查了此项?同样在文件中导入后,您也在NgModule imports array中导入了它,对吗?