I am working on a datepicker that will disable all the selection when the day falls on Friday & Saturday.
I've already created a datepicker that will only select next week's date (with the help of the other member here).
var date = new Date();
var weekday = date.getDay();
var daysTillWeekOver = 7 - weekday;
var dateMax = `+${daysTillWeekOver}d`;
var dateMin = new Date(Date.now());
dateMin.setDate(dateMin.getDate());
$(".datepicker").datepicker({
minDate: dateMax,
maxDate: daysTillWeekOver + 6
});
I want all the dates on my datepicker will be disabled once the day in the current week falls every Friday and Saturday.