disableDates Array|Function
(default: null)
An array or function that will be used to determine which dates to be disabled for selection by the widget.
Example - specify an array of days to be disabled
<div id="daterangepicker"></div>
<script>
$("#daterangepicker").kendoDateRangePicker({
disableDates: ["we", "th"]
});
</script>
Example - specify an array of dates to be disabled
<div id="daterangepicker"></div>
<script>
$("#daterangepicker").kendoDateRangePicker({
disableDates: [new Date(2015,9,12), new Date(2015,9,22)]
});
</script>
you can also pass a function that will be dynamically resolved for each date of the calendar. Note that when the function returns true, the date will be disabled.
Example - use a function to disabled dates
<div id="daterangepicker"></div>
<script>
$("#daterangepicker").kendoDateRangePicker({
disableDates: function (date) {
var disabled = [13,14,20,21];
if (date && disabled.indexOf(date.getDate()) > -1 ) {
return true;
} else {
return false;
}
}
});
</script>
note that a check for an empty date
is needed, as the widget can work with a null value as well.