mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
3.91k stars 1.19k forks source link

[pickers] Allow to pick a range of Months with Date Range picker #4995

Open joserodolfofreitas opened 2 years ago

joserodolfofreitas commented 2 years ago

Summary πŸ’‘

Sometimes the specific date of the month is not important to the user. In these cases, it'd be interesting to be able to provide a better experience by allowing users to select just the months on the range, like we have with the month view in DatePicker.

This issue was originally requested/suggested on a zendesk ticket: https://mui.zendesk.com/agent/tickets/2854

Examples 🌈

Basic behavior implementation using the date picker: https://codesandbox.io/s/datepicker-views-year-month-l1wyyv?file=/demo.js

Picture of requested solution:

https://github.com/mui/mui-x/assets/3165635/4b347131-1115-47ff-8bcc-5bf5dfa6ea64

TheRealCuran commented 1 year ago

In case it helps with prioritising this issue: my Order ID :credit_card: is: 47016

spiftire commented 1 year ago

I would like to upwote this issue. my Order ID πŸ’³οΈ is: 45069

destegabry commented 1 year ago

Me too! My order ID πŸ’³ is: 44740

razlani commented 1 year ago

Obligatory thumbs up and #metoo please and thank you!

istisiki commented 1 year ago

:shipit: please! πŸŽ‰

razlani commented 1 year ago

:shipit: please! πŸŽ‰

I ended up just building from scratch for month/year range selectors - easier than you think assuming you don't need to leverage some of the fab features of this lib

istisiki commented 1 year ago

I ended up just building from scratch for month/year range selectors - easier than you think assuming you don't need to leverage some of the fab features of this lib

Indeed, we ended up building our own! Would still love it if it was built-in. :)

spiftire commented 1 year ago

If you have implemented a solution maybe you wouldn't mind sharing? @razlani @istisiki

goldnite commented 1 year ago

I upvote this issue. This feature is necessary.

TheRealCuran commented 1 year ago

@oliviertassinari / @joserodolfofreitas this ticket is still marked as β€žwaiting for :+1:β€œ while having almost a 150 :+1: and several β€žvotes with walletβ€œ already. Is this an oversight or are actually more votes needed?

joserodolfofreitas commented 1 year ago

@TheRealCuran, No more votes are needed. We've planned to work on it just after the date time range components.

razlani commented 1 year ago

If you have implemented a solution maybe you wouldn't mind sharing? @razlani @istisiki

Would that I could, but for the wrath of my employer.

-Private companies amirite?

kinoli commented 8 months ago

Would love to see this implemented.

oliviertassinari commented 8 months ago

I have added an example of what it looks like on Google Ads in the issue description.

Akbar1909 commented 8 months ago

πŸ‘

mansurmabo commented 7 months ago

Please do it finally my order id 78881. Needs Month, Quarter, Years.

bdhcode commented 7 months ago

Upvoted

michaelfr commented 6 months ago

upvoted !

shipsaw commented 5 months ago

Upvoted as well

LevapVeeskela commented 2 months ago

Hello, I have DateRangePicker from @mui/x-date-pickers-pro and I resolved custom calendarHeader with two selects for years and months, but when I click on its, then emit event onClose and modal will close... I resolved that problem with onOpen, open props and useState, but this is a crutch, and I need use mouseout event for modal as temp a resolve. Can you add support native events mouseout and etc for container modal/content/paper? image

LukasTy commented 2 months ago

@LevapVeeskela Have you tried using slotProps.popper to bind your events? πŸ€”

matheus1519 commented 1 month ago

two years later and we don't have a React Month Range Picker from MUI

david-ic3 commented 1 month ago

Looking for this feature, it's a pain when end users have to go 10 years in the past.

@LukasTy , it is more motivating being focused on new features. But please consolidate what you have. Should we be looking for alternative libraries as we certainly do not want to develop this on our own.

Order ID: #19458

LukasTy commented 1 month ago

@david-ic3 I appreciate you voicing your interest and concern! πŸ™ Could you clarify your request? This issue is about month range picker, but from your comment it seems that the pain point is the lack of year navigation within the Date Range Picker, am I correct? πŸ€”

david-ic3 commented 1 month ago

Β©LukasTy thanks for the quick turnaround. You can check the post of @LevapVeeskela

When using the date range picker , try selecting a date that is 30 years in the past from the one selected without using the keyboard :-)

image