I use the pickadate library so the user can select dates. By default, all dates should be disabled. This works by adding disabled: [true].
var myPicker=$("#inputDatetime").pickadate(
{
format:"dd. mmmm yyyy",
formatSubmit:"yyyy-mm-dd",
min:dt,
selectYears:2,
close:"Schliessen",
today:"Heute",
selectMonths:!0,
disable: [true]
}
), picker = myPicker.pickadate("picker");
After that, I can include dates :
picker.set('disable', activeDays);
Now I want to have the blacklisted days of the week. For example, all Mondays and all Mondays should always be blocked. I have this data in another variable:
var disabledDates = [1, 3];
How can I make sure weekdays are disabled after I have included some specific dates?
source
share