[技術分享]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