mui / material-ui-pickers

Date & Time pickers for Material UI (support from v1 to v4)
https://github.com/mui/material-ui-pickers/issues/2157
MIT License
2.32k stars 833 forks source link

Can we make it possible to select year in DateRangePicker #1769

Closed IgorTurko closed 4 years ago

IgorTurko commented 4 years ago

Hi guys,

I am start using DateRangePicker and its great. Thanks a lot for this. I wanted to ask can we add year selector to the top. The same like in DatePicker. image

For example sometimes I have quite long ranges and its annoying to click <<back 30 times. So what I would suggest is to add year somewhere here: image

Or maybe its a workaround with renderInput props?

Br, Igor

dmtrKovalenko commented 4 years ago

@oliviertassinari what do you think? As for me, I think that the implementation of date range picker with year selection requires too many efforts.

Nobody of Airbnb, booking.com, or google flights have year selection for range. But I suppose its because of business value (you're probably not looking for booking flight for 2030). But probably it can be a real case... e.g. in analytics

@IgorTurko why do you need it?

IgorTurko commented 4 years ago

I have some statistics from the year 2018 lets say. And that means I need to select this date twice for the start and for the end.

oliviertassinari commented 4 years ago

@dmtrKovalenko agree, I don't think that the date range picker should support it. Even the existing paid UI libraries don't. Right now, end-users can work around the issue with the textbox.

Also, the usage of two date pickers could be a good tradeoff.

oliviertassinari commented 4 years ago

I have added the waiting for users upvotes tag. I'm closing the issue as we are not sure people are looking for such. So please upvote this issue if you are. We will prioritize our effort based on the number of upvotes.