[pickers] Month DatePicker showing months as disabled when opened #8837
Labels
bug 🐛
Something doesn't work
component: pickers
This is the name of the generic UI component, not the React module!
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/s/date-and-time-pickers-forked-9pltzg?file=/src/App.tsx
Steps:
startDate
that is in a future year (2025 for example)endDate
pickerCurrent behavior 😯
When opening a month date picker with a set
minDate
, it will open the right year, but it will have all months disabled, even though they should be validExpected behavior 🤔
It should open the month picker in the
minDate
year, with all months beforeminDate
disabledContext 🔦
Since
mui-x
doesn't have aDateRangePicker
for month periods, I tried creating one with twoDatePicker
s where I setviews=["month", "year"]
, and I use the first value as theminDate
for the second picker, and the second value for themaxDate
for the first picker. But when trying to select the second value it displays disabled months where it shouldn't beApparently using
["year", "month"]
fixes the issue, but that isn't ideal to our use-case.Your environment 🌎
npx @mui/envinfo
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: