aboveyunhai / chakra-dayzed-datepicker

Chakra UI + Dayzed = datepicker
https://aboveyunhai.github.io/chakra-dayzed-datepicker/
MIT License
222 stars 46 forks source link

Disable individual dates #44

Closed JollyGrin closed 1 year ago

JollyGrin commented 1 year ago

I'm trying to create an event calendar that allows people to select dates. Yet once someone selects a date, I need to disable it for others.

Thus how do I pass a disabled prop to individual dates?

aboveyunhai commented 1 year ago

Right now there is no such functionality, but I can definitely come up one easily later. something like the following

disabledDates={new Set({
 // pass your date here
 // you need to keep updating your own logic here.
})}

You just need to come up your own set dynamically if it keeps changing but I generally wouldn't recommend.

JollyGrin commented 1 year ago

Great! That would be very useful! Using another library atm to handle this behavior so no rush/priority. I'm passing an array of dates and it disables those

aboveyunhai commented 1 year ago

close by #49