mui-x
mui-x copied to clipboard
[CalendarPicker] Add prop `showFixedNumberOfWeeks`
I would like to be able to set a property showFixedNumberOfWeeks for Datepicker.
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
Summary 💡
showFixedNumberOfWeeks - whether to always show fixed number (6) of weeks, regardless of the number of days and weeks in a month. By analogy with how it is done in the react-calendar library.
type = boolean; default value = false;
Examples 🌈
showFixedNumberOfWeeks = true; // There will always be 6 weeks in the Calendar block.
Screenshots of the expected behavior:
Motivation 🔦
- It is convenient that the block with the calendar always has a fixed height and there are no cases when an empty space remains at the bottom of the calendar.
- You can also quickly jump to the first days of the next month if they appear in the current month overview.
I'd say we should we wait for upvotes on this one? What do you think @oliviertassinari @eps1lon?
I have seen a fixed number of weeks as the default or an existing option in:
- Google's products (Google Calendar + Gmail)
- http://react-day-picker.js.org/examples/customization-fixed-weeks
- https://ant.design/components/date-picker/
- https://github.com/arqex/react-datetime
There is also another topic bundled in this discussion: the display of days from another month: mui/mui-x#6494.
@joserodolfofreitas if you want to prioritize this one