I'm hoping there's a simple solution to my question. I'm trying to disable weekends and a few select days in JQuery datepicker. I figured out how to disable certain dates but can't figure out how to add the "noWeekends" command. Can someone help me?
Here is the code:
var holidays = ["12/24/2020","12/25/2020", "12/31/2020"];
$(document).ready(function(){
$("#datepicker").datepicker({
beforeShowDay: function(date){
var string = jQuery.datepicker.formatDate('mm/dd/yy', date);
return [ holidays.indexOf(string) == -1 ]
},
beforeShowDay: $.datepicker.noWeekends // THIS IS NOT WORKING
});
});
I'm just trying to combine the noWeekend command along with my holidays. Thank you!!