If you create a datepicker with min
and max
options like this:
var datePicker = $('#input').kendoDatePicker({
min: new Date(2013, 0, 1),
max: new Date(2013, 11, 31)
}).data("kendoDatePicker");
then you can't set a value outside of that date range. You could either create your own widget, or you could remove the min/max restrictions temporarily for setting your value:
// temporarily remove the restrictions
var min = datePicker.options.min;
var max = datePicker.options.max;
datePicker.options.min = new Date(1900, 0, 1);
datePicker.options.max = new Date(2099, 11, 31);
// set your date which may be outside of the range specified by min/max
datePicker.value(new Date(2009, 0, 1));
// restore the min/max options so the user still can only choose within the range
datePicker.options.min = min;
datePicker.options.max = max;