[DatePicker] Can't see date view for the month in which all the dates are disabled with shouldDisableDate #4917
Labels
component: DatePicker
The React component.
component: pickers
This is the name of the generic UI component, not the React module!
new feature
New feature or request
Duplicates
Latest version
Current behavior 😯
The user selects the month/year with all dates disabled in this month/year and material ui redirects the user to the "date" view with the closest enabled date.
I have enabled dates:
I click on the datepicker:
I want to change the date to see even disabled dates in 2019 year
I click on 2019 year and I'm redirected to the closest enabled 2020-09-30
Code:
`
export const SnapshotDatePicker = ({handleCloseDialog, snapshotDatesList, changeSnapshotDate}) => {
const [date, changeDate] = useState(new Date());
};
SnapshotDatePicker.propTypes = {
snapshotDatesList: PropTypes.array,
handleCloseDialog: PropTypes.func,
changeSnapshotDate: PropTypes.func,
};
`
Expected behavior 🤔
Want to see date view also for disabled dates. Click on 2019 and see 2019 dates even if they are disabled
Steps to reproduce 🕹
Steps:
Context 🔦
We need to create a Datepicker to choose the date from an array of available dates. The rest of the dates (which are not in this array of available) need to be disabled.
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: