Date Picker - Disabled Weekdays Examples

Example 1: Disable Weekends

Use Case: Business applications where only weekdays are selectable.
Disabled Days: Saturday (6) and Sunday (0)
No date selected
const calendar = CalendarController('#weekday-picker', { disabledDaysOfWeek: [0, 6] // Disable Sunday and Saturday });

Example 2: Custom Business Schedule

Use Case: Businesses that are closed on specific days (e.g., Monday and Wednesday).
Disabled Days: Monday (1) and Wednesday (3)
No date selected
const calendar = CalendarController('#business-picker', { disabledDaysOfWeek: [1, 3] // Disable Monday and Wednesday });

Example 3: Dynamic Day Management

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 ] });