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

[Memory Leak] - Disable specific dates

Open BLOCKMATERIAL opened this issue 2 years ago • 6 comments

Greetings all , I have run into this problem , I need to implement functionality to select dates Semi-Montly , for example : User can select the 16th date and the last day of the month .

We have disabledDates props, I have done two solutions

  1. A function that will generate an array of dates to be disabled in three loops.
  2. ts file with a ready made constant

For example I have captured only 2022-2023 which is about 2-3k lines of code.

When I pass this array to props a terrible trolling happens, especially when scrolling through the months .

I understand that disabled dates are rendered immediately . Perhaps I am doing something wrong or there is another way.

BLOCKMATERIAL avatar May 25 '23 18:05 BLOCKMATERIAL

Related to #107?

theabdulmateen avatar May 30 '23 08:05 theabdulmateen

Related to #107?

If I understand correctly you want to have the opposite function disabledDates to the avaliableDates example ? If so, it would seem quite logical and useful.

But as I understand it from the source code, there is too much integration and iteration of the library via forEach and rendering of all the elements, and this also needs to be optimized.

BLOCKMATERIAL avatar Jun 01 '23 08:06 BLOCKMATERIAL

Hi @BLOCKMATERIAL 👋

Very sorry for the delay.

Thanks for the feedback.

You're right, there are quite a few things to optimize and correct. Also, the buindle size is too much I think. We'll fix that soon.

@BLOCKMATERIAL how can we help you with your problem?

@theabdulmateen if it's the opposite operation to disabledDates that you want, we'll set it up.

All PRs are welcome

onesine avatar Jun 02 '23 14:06 onesine

@onesine Thanks, the community would be very grateful if avaliableDates props could at least be implemented , I am currently working on a PR but it's related to the input mask .

BLOCKMATERIAL avatar Jun 09 '23 14:06 BLOCKMATERIAL

has anyone started working on this fix?

BLOCKMATERIAL avatar Aug 21 '23 15:08 BLOCKMATERIAL