dates Array
Specifies a list of dates, which will be passed to the month content.
Example - specify a list of dates
<style>
.party{color:red}
</style>
<input id="datepicker" />
<script>
$("#datepicker").kendoDatePicker({
value: new Date(2000, 10, 1),
month: {
content: ({ date, dates, value }) => `<span class="${isInArray(date, dates) ? 'party' : '' }">${value}</span>`
},
dates: [
new Date(2000, 10, 10),
new Date(2000, 10, 30)
] //can manipulate month template depending on this array.
});
function isInArray(date, dates) {
for(var idx = 0, length = dates.length; idx < length; idx++) {
var d = dates[idx];
if (date.getFullYear() == d.getFullYear() &&
date.getMonth() == d.getMonth() &&
date.getDate() == d.getDate()) {
return true;
}
}
return false;
}
</script>