wojtekmaj / react-daterange-picker

A date range picker for your React app.
https://projects.wojtekmaj.pl/react-daterange-picker
MIT License
524 stars 64 forks source link

Disabling certain dates #304

Closed emyrue closed 1 year ago

emyrue commented 1 year ago

Is there a way to make it so you can't pick certain date ranges, or at least style certain date ranges on the calendar so it's clear that they've already been picked?

wojtekmaj commented 1 year ago

You can't disable certain dates in the input (how would we even approach this? Ughhh! But you totally can in the calendar, using tileDisabled prop. See https://github.com/wojtekmaj/react-calendar README for details.

dlsso commented 3 months ago

This only prevents you from clicking on the date, it still allows ranges that contain disabled dates. Should I open a new issue for this as a feature request?

The expected/desired behavior would be to disable all days that would include any unavailable days (like this) or at least throw an error.