【发布时间】:2022-10-07 20:34:00
【问题描述】:
我使用@angular/material - 10.2.7 版本。
<mat-datepicker-actions>
<button mat-button matDatepickerCancel>Cancel</button>
<button mat-raised-button color="primary" matDatepickerApply>Apply</button>
</mat-datepicker-actions>
这个构造不起作用(不支持我的版本?)我该如何解决这个问题?
错误:
'mat-datepicker-actions' is not a known element:
1. If 'mat-datepicker-actions' is an Angular component, then verify that it is part of this module.
2. If 'mat-datepicker-actions' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
【问题讨论】:
-
import {MatDatepickerModule} from '@angular/material/datepicker'; -
没用,可惜
标签: angular datepicker