【问题标题】:Kendo Datepicker How can i show year range at on click of datepickerKendo Datepicker 如何在单击 datepicker 时显示年份范围
【发布时间】:2016-02-03 06:35:27
【问题描述】:

我正在使用剑道日期选择器,我想在日历打开时显示年份范围(1990-1990),而不是显示今天的日期(1 月 6 日)。

【问题讨论】:

    标签: kendo-ui kendo-mobile


    【解决方案1】:

    使用depthstart (http://docs.telerik.com/kendo-ui/api/javascript/ui/datepicker#configuration-depth):

    $("#datepicker").kendoDatePicker({
        depth: "year",
        start: "year"
    });
    $("#datepicker").kendoDatePicker({
        depth: "decade",
        start: "decade"
    });
    $("#datepicker").kendoDatePicker({
        depth: "century",
        start: "century"
    });
    

    【讨论】:

    • 谢谢,但我需要日期选择器首次打开时显示年份范围的“CENTURY”。
    • @NagarajM 用“世纪”替换“年”,它只支持1900年到2099年的10年步长
    • 谢谢,我已经用“世纪”替换了“年”,它的工作原理。
    • @NagarajM 还有一步是“十年”
    • 谢谢,我需要的“十年”。我想删除“k-picker-wrap”类默认样式,是否可以使用内置样式的 kendo datepicker。
    猜你喜欢
    • 2019-01-28
    • 2021-08-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-09
    • 2017-09-15
    • 1970-01-01
    相关资源
    最近更新 更多