6eDesign/svelte-calendar

[Feature Request] Disable Dates

Opened this issue · 2 comments

This is something I've used with flatpicker but flatpicker does not work on mobile and reverts to the native date picker.

I'm working on a booking application that requires a user to select an available date. Right now the application flow is the user checks the available dates then picks a date from the datepicker. This is less than ideal.

I think it will be incredibly useful as a prop and the moment it is added to svelte-calender I'm going to add it to my project in a heartbeat.

Related Doc:
https://flatpickr.js.org/examples/#disabling-specific-dates

Something like this:

{
    disable: ["2025-01-30", "2025-02-21", "2025-03-08", new Date(2025, 4, 9) ],
    dateFormat: "Y-m-d",
}

Was going to ask about this, I guess i"ll try and do some other validation

please! add this option.