Selecting Multiple Dates Programatically in kevin luck datepicker - JQuery -
i have 3 jquery datepicker of kevin luck. 1 datepicker multimonth(namely display), other 2 single month(namely from,to) bind texbox. if user select date , date dates range between , should select in display datepicker.
my code :
$(function () { $(".display").datepickermultimonth( { startdate: '01/01/1996', nummonths: 3, inline: true, selectmultiple: true, rendercallback: function ($td, thisdate, month, year) { } } } ).bind( 'dpmonthchanged', function (event, displayedmonth, displayedyear) { // uncomment if have firebug , want confirm works expected... //console.log('dpmonthchanged', arguments); } ).bind( 'dateselected', function (event, date, $td, status) { // uncomment if have firebug , want confirm works expected... //console.log('dateselected', arguments); //alert(event + "," + date + "," + $td + "," + status); } ); $('#getselected').bind( 'click', function (e) { alert($('div.calendar').dpmmgetselected()); return false; } ); }); $(".from").datepicker({ startdate: '01/01/1996', rendercallback: function ($td, thisdate, month, year) { } }); $(".to").datepicker({ startdate: '01/01/1996', rendercallback: function ($td, thisdate, month, year) { } }); any suggestion helpful.
thanks.
finally found answer,
when user select , date, save value date , recreate multimonth calendar. in rendercallback function check thisdate from,to date, if thisdate in from,to date range add 'selected' class particular td.
it may't approach, solves problem.
Comments
Post a Comment