set the max date on kendo date picker from client side
You have to use the setOptions()
method to change that:
var datepicker = $("#datepicker").data("kendoDatePicker");
datepicker.setOptions({
max: new Date(today.setDate(today.getDate()+30))
});
Or if you want just do this in the initialization:
$("#datepicker").kendoDatePicker({
max: new Date(today.setDate(today.getDate()+30))
});
The setDate
function returns the date as an integer (the long number you posted); try sending that as a parameter to a new Date object, like so:
$('#datepicker').kendoDatePicker({
max: new Date(today.setDate(today.getDate()+30));
});