hypeserver / react-date-range

A React component for choosing dates and date ranges.
MIT License
2.57k stars 658 forks source link

Can't disable calendar buttons given a condition (such as loading state) #600

Closed eglove closed 6 months ago

eglove commented 1 year ago

Subject of the issue

I found the "disabled" prop in the documentation for the Calendar. (<Calendar disabled={true} />) and confirmed via React DevTools that he disabled prop is set to true. But users can still clock on a day to select it.

[BUG] Bug Reproduce Steps

Create Calendar and pass "true" as disabled prop.

<Calendar disabled={true} />

[BUG] Expected behaviour

Days and month scrolling (all buttons) are disabled from user interaction and ideally apply the "rdrDayDisabled" class on all days to gray them out.

Environment

Package Version: 1.1.3 React version: 16.14.0 Node version: 16.19.0 Browser: Google Chrome latest

umakantp commented 6 months ago

There is no prop as disabled={true} even in documentation

eglove commented 6 months ago

Dang man, this issue is nearly a year old. And the project isn't maintained. What are you doing here? I was forced to use this component because someone at work thought it was a good idea to install it. I was reading through source to try to find a way to disable buttons. I think I wrapped it in something and disabled all children.

umakantp commented 6 months ago

@eglove If I had access I would have directly closed it.

And the project isn't maintained. What are you doing here?

I had created its new repo/version of this hence was trying to go through bugs and fix them.