Use Case: Administrative interface where disabled days can be configured dynamically.
No date selected
Currently disabled days: None
// Set disabled days programmatically
calendar.setDisabledDaysOfWeek([0, 6]);
// Add a single day
calendar.addDisabledDayOfWeek(1);
// Remove a single day
calendar.removeDisabledDayOfWeek(0);
// Get current disabled days
const disabledDays = calendar.getDisabledDaysOfWeek();
Example 4: Combined Constraints
Use Case: Appointment booking system with both date range limits and disabled weekdays.
Features: Date range (next 30 days), weekends disabled, plus specific blocked dates
No date selected
const today = new Date();
const maxDate = new Date();
maxDate.setDate(today.getDate() + 30);
const calendar = CalendarController('#combined-picker', {
minDate: today,
maxDate: maxDate,
disabledDaysOfWeek: [0, 6], // Weekends
disabledDates: [
// Block specific holidays or maintenance days
new Date(2025, 11, 25), // Christmas
new Date(2025, 0, 1) // New Year
]
});