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
});
