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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -