mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[CalendarPicker] Add prop `showFixedNumberOfWeeks`

Open InFuz opened this issue 3 years ago • 3 comments

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: Снимок экрана 2021-03-30 в 17 20 18

Motivation 🔦

  1. 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.
  2. You can also quickly jump to the first days of the next month if they appear in the current month overview.

InFuz avatar Mar 30 '21 13:03 InFuz

I'd say we should we wait for upvotes on this one? What do you think @oliviertassinari @eps1lon?

mnajdova avatar Apr 19 '21 17:04 mnajdova

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.

oliviertassinari avatar Apr 19 '21 18:04 oliviertassinari

@joserodolfofreitas if you want to prioritize this one

flaviendelangle avatar Jul 04 '22 12:07 flaviendelangle