<input id="startDate" kendo-date-time-picker
k-ng-model="vm.startDate"
k-on-change="vm.updateStartDate()"
required
/>
如何将禁用日期添加到此日期选择器? 不使用jquery !! 是否存在k-disabled-dates属性?
答案 0 :(得分:1)
指定k-options属性:
<input id="startDate" kendo-date-time-picker
k-ng-model="vm.startDate"
k-on-change="vm.updateStartDate()"
required,
k-options="startDateOptions"
/>
然后使用disabledDates(http://docs.telerik.com/kendo-ui/api/javascript/ui/datetimepicker#configuration-disableDates)配置实现选项,但这适用于您的情况,即
$scope.startDateOptions = {
disableDates: function (date) {
var disabled = [13,14,20,21];
if (date && disabled.indexOf(date.getDate()) > -1 ) {
return true;
} else {
return false;
}
}
};