javascript - How to disable weekdays and custom days in jquery datepicker? -


this code below need disable weekdays , given days how can ? can 1 me ?

jquery fiddle

$(document).ready(function(){ var desingndate = $('#designidunavialble').html(); var splitdate = desingndate.split(',');    // console.log(splitdate.length);     var arrdisableddates = {};     (var = 0; < splitdate.length; i++) {         //console.log(splitdate[i]);         arrdisableddates[new date(splitdate[i])] = new date(splitdate[i]);         }       $("#idate").datepicker({                dateformat: 'dd-mm-yy',         beforeshowday: function (dt) {             var bdisable = arrdisableddates[dt];             if (bdisable) return [false, '', ''];             else return [true, '', ''];         }     });  }); 

working fiddle

this may

function deadlinedates(date) {       dmy = date.getdate() + "-" + (date.getmonth()+1) + "-" + date.getfullyear();       var day = date.getday();          var desingndate = $('#designidunavialble').html();         var splitdate = desingndate.split(',');          var arrdisableddates = {};         (var = 0; < splitdate.length; i++) {                 arrdisableddates[new date(splitdate[i])] = new date(splitdate[i]);             }         var bdisable = arrdisableddates[date];        if (bdisable) return [false, '', ''];        else return [(day != 0 && day != 6)];      }   $(document).ready(function(){       $("#idate").datepicker({                dateformat: 'dd-mm-yy',         beforeshowday: deadlinedates     });  }); 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -