javascript - set the max date on kendo date picker from client side -
i have this:
var today = new date();
updating kendo datepicker:
$('#datepicker').kendodatepicker({ max: today.setdate(today.getdate()+30); });
in debugger max value 1404408808080
in today variable date right 1 2014-07-03t17:3
. want set max date kendodatepicker 30 days current date.
you have use setoptions()
method change that:
var datepicker = $("#datepicker").data("kendodatepicker"); datepicker.setoptions({ max: new date(today.setdate(today.getdate()+30)); });
or if want in initialization:
$("#datepicker").kendodatepicker({ max: new date(today.setdate(today.getdate()+30)); });
Comments
Post a Comment