JQuery UI Date Picker - Adding a class to all selected <td> -


i trying add class each <td> between 2 specific dates. here code;

http://jsfiddle.net/7q4bt/171/

$(function() {    $(".checkin-date__input").attr("placeholder", "mm-dd-yyyy").datepicker({         dateformat: "mm d yy",         mindate: +1,         showon: "focus",         numberofmonths: 2     }).on("change", function(e) {         var curdate = $(this).datepicker("getdate");         $(this).datepicker("setdate", curdate);         if($('.checkin-date__input').datepicker("getdate")) {             $( ".checkout-date__output" ).datepicker( "option", "mindate", $('.checkin-date__input').datepicker("getdate") );         };     });      $(".checkout-date__output").attr("placeholder", "mm-dd-yyyy").datepicker({         dateformat: "mm d yy",         mindate: +1,         showon: "focus",         numberofmonths: 2     }).on("change", function(e) {         var curdate = $(this).datepicker("getdate");         $(this).datepicker("setdate", curdate);         if($('.checkin-date__input').datepicker("getdate")) {             $( ".checkout-date__output" ).datepicker( "option", "mindate", $('.checkin-date__input').datepicker("getdate") );         };         if($('.checkout-date__output').datepicker('getdate')) {             console.log($('.ui-datepicker'));             $('.ui-datepicker').find('.ui-datepicker-current-day').prevall('td:not(".ui-datepicker-unselectable")').addclass('someclass');         }     }); 

the second input limited date inputted first input.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -