Is there a way to make days from an array unselectable in Kendo Datepicker?
Within the template I´ve them as non-visible but I want them to visible and unselectable instead.
Razor:
<div>
@(Html.Kendo().DatePicker()
.Name("datepicker")
.Value(DateTime.Today)
.MonthTemplate("# if ($.inArray(+data.date, birthdays) != -1) { #" +
"<div style=\"display:none;\">#= data.value #</div>" +
"# } else {#" +
"#= data.value #" +
"# } #")
)
</div>
Script:
<script>
var today = new Date(),
birthdays = [
+new Date(today.getFullYear(), today.getMonth(), 11),
+new Date(today.getFullYear(), today.getMonth() + 1, 6),
+new Date(today.getFullYear(), today.getMonth() + 1, 27),
+new Date(today.getFullYear(), today.getMonth() - 1, 3),
+new Date(today.getFullYear(), today.getMonth() - 2, 22)
];
</script>