-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CalendarPicker] Don't move to closest enabled date when props.date
contains a disabled date
#6537
Conversation
…ontains a disabled date
These are the results for the performance tests:
|
Hello, this actually caused some tests to fail on my end. I'm wondering why this wasn't considered a breaking change? |
It was considered a bug fix because the existing behavior could lead to UI freeze. |
Thanks for your reply @flaviendelangle. I can understand that this was considered a bugfix but this was existing behavior that people might've been relying on like I did. The fix on my end was pretty straightforward but I can imagine it also breaking things for other people. I'm not sure how strictly MUI adheres to semver and I don't want to be pedantic about it but I would consider this a breaking change even if it was a bugfix. |
We could probably have added a temporary prop until v6 to opt-out of the behavior instead of removing it altogether, you are right |
What was the rationale behind removing this? Removal of this behavior has really messed up my application as we relied on this happening. Any suggestions on how to get this effect without me having to create all the logic myself? I tried importing your internals directly (which I don't really want to do) but that doesn't work since my project is in CRA and Jest within it can't import ESM scripts... Seems like this should have been an optional opt-in/out prop rather than a removal. And not just a temporary prop for removal later. |
Hi, Could you describe why this removal broke your application ? |
We have multiple date pickers within multiple rows of a table that, when you select dates in other rows, disables dates for rows that will be created later. In some instances, this means that we disable entire months at a time in the past/future as well as "today". We were relying on this to switch, if "today" is disabled, move to the next available non-disabled date. For example, if we disabled the past and this month, we'd have wanted it to select the first day of the next month. We are perfectly fine with the potential performance hit when using the feature with far-away dates. |
In the past, the switch occurred when opening the picker. |
We are only relying on it happening when the picker is opened. We wouldn't want it on mount since we would want to display previously input values, even if they are disabled now. For example, if we selected a date previously that is now disabled, we wouldn't want that date to now start changing. |
Fixes #4705 for
master
(equivalent of #6146)