我已经尝试并获得了以下解决方案,因此如果有人需要,请考虑发布它:
<kendo-datepicker
[min]="min"
[max]="max"
[bottomView]="'year'"
[format]="'yyyy'"
[(value)]="value"
></kendo-datepicker>
仅显示一年,只能选择一年,这就是我使用的
<kendo-datepicker
format="yyyy" <!-- Shows year only inside the textbox -->
activeView="decade" <!-- Starting point inside the popup -->
bottomView="decade" <!-- Can't navigate down in the popup -->
topView="decade" <!-- Can't navigate up in the popup -->
<!-- Add more option below as needed -->
></kendo-datepicker>
拷贝 - 可观
<kendo-datepicker
format="yyyy"
activeView="decade"
bottomView="decade"
topView="decade"
></kendo-datepicker>
更多信息在这里:
KendoDatePickerComponent APIDoc