如何制作kendo-angular-datepicker才能显示一年

问题描述 投票:0回答:2

我已经尝试并获得了以下解决方案,因此如果有人需要,请考虑发布它:
kendo-ui typescript2.0 kendo-ui-angular2 kendo-datepicker kendo-angular-ui
2个回答
2
投票
<kendo-datepicker [min]="min" [max]="max" [bottomView]="'year'" [format]="'yyyy'" [(value)]="value" ></kendo-datepicker>

仅显示一年,只能选择一年,这就是我使用的

2
投票
<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

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.