mui-x
mui-x copied to clipboard
[pickers] Improve the customization of the range picker calendar header
Closes #10566
The Argos diff shows a behavior fix, now the DateRangeCalendar disables month switching when props.disabled === true just like on the DateCalendar component
Deploy preview: https://deploy-preview-11988--material-ui-x.netlify.app/
Updated pages:
Generated by :no_entry_sign: dangerJS against 8367b40fa61d4a9f862646ea0dd16bedd450ab17
But does it make sense though? 🤔 Especially for RangeCalendar. What if the selected range spans >2 months? After this change, you would no longer be able to check the range value if the DateRangeCalendar is disabled.
For you does it make sense on DateCalendar?
Or do you think the behavior should be different between the two components?
For you does it make sense on
DateCalendar? Or do you think the behavior should be different between the two components?
It sort of makes sense on DateCalendar, because it will show the month where the value is selected, so, disabling month switching is not a problem, but on DateRangeCalendar, as I've raised the point previously, it's a bit of an issue. 😟
IMHO, I don't see much point in disabling navigation at all.
Maybe even with validation, WDYT?
The only problem, if we'd never disable the navigation would be the 1900 year limit. 🙈
All in all, I think that the navigation button disabling topic could be tackled separately, maybe even by doing grooming and discussing it within the team, WDYT?
The DateRangeCalendar disabled icons are the last remaining topic under discussion I'll have a second look to see if I have good reason to argue but I'll probably just revert if the change it not an obvious win :+1:
Reverted