I would like to be able to deactivate days + weekday numbers 1 to 7.
calendar.flatpickr({
disable: dateUnvailableCalendar,
minDate: "today",
onChange: function (selectedDates, dateStr) {
calendarHandleChange(dateStr);
}
});
This is what I have already done. this disable days i send in an array.
now i wish i could disable day number 5 and 7 of every week of the whole year.
Do you know how I can do this please?
Thank you for help.
2
Answers
I found a solution however in dynamic mode it does not work. Here is the solution:
do you have any idea how i can convert my json to look like my example? I tried the JSON.stringify but the json comes out with [] and it is not interpreted. Thank you.
console.log(dateUnvailableCalendar);
Disabling range of dates
Disabling specific dates
To disable dates that are in an array:
In your case, for specific dates and Saturdays:
I suppose that in ‘dateUnavailableCalendar’ you will have an array of dates.