react-tailwindcss-datepicker icon indicating copy to clipboard operation
react-tailwindcss-datepicker copied to clipboard

[Feature Request] Support for `enabledDates`

Open theabdulmateen opened this issue 2 years ago • 3 comments

Hi, thank you for the awesome library.

I came across a use case where I needed to enable selection of dates only for a specific range (i.e., enabledDates similar to disabledDates), Also the disabled dates do not "gray" out, it would be nice if that could be fixed as well.

Thanks.

theabdulmateen avatar Apr 05 '23 11:04 theabdulmateen

Hi @theabdulmateen 👋

Thanks for your feedback.

I believe you can do it with the options currently available. If not, it would mean that I don't understand your concern.

onesine avatar Apr 06 '23 13:04 onesine

Yeah, I understand this could be done with the current disabledDates prop but that would mean I need to generate the list of disabled dates.

I have a list of available dates for which I want to enable the date selection, this list consists of dates ranging over a year, so computing the date groups for which the dates should be disabled from this list is unnecessary and is not feasible.

So having a enabledDates would mean I pass in the available dates and that's it. I hope that makes sense.

theabdulmateen avatar Apr 10 '23 10:04 theabdulmateen

Hi 👋 @theabdulmateen

I'm sorry for the delay.

I think I now understand your problem. You want the reverse operation of disabledDates. This is relevant and very useful. We will set this up.

onesine avatar Jun 02 '23 14:06 onesine

Hi, @theabdulmateen , Sorry for the late reply.

Please use the new version.

onesine avatar Jan 30 '25 12:01 onesine