[技术分享]20171130_Kendo UI _ datePicker日期控件如何只选择年,不选择月,日?


datePicker日期控件是很常用的控件,可以使用 start , depth来控制取值的范围。

start ,depth可以选择的参数有month,year,decade ,century 。

如何要只选择年:我们要用参数 decade ,以此类推。

 

$("#monthpicker").kendoDatePicker({
     // defines the start view
        start: "year",

      // defines when the calendar should return date
        depth: "year",

     // display month and year in the input
        format: "MMMM yyyy",

      // specifies that DateInput is used for masking the input element
        dateInput: true
 });

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM