nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
22.01k stars 1.54k forks source link

[Feature Request] Show start month / end month in date range picker dropdown #2876

Open jdnarvaez opened 6 months ago

jdnarvaez commented 6 months ago

Is your feature request related to a problem? Please describe.

The date / range pickers are great. It would be awesome if for the date range picker when it is opened and the range spans multiple months, that the second month shown is the month that contains the end date, similar to https://react-tailwindcss-datepicker.vercel.app/demo

Screenshot 2024-04-25 at 1 30 51 PM

Describe the solution you'd like

As a user, when I have selected a date range that spans multiple months, I want the two months shown in the dropdown calendar to represent the month containing the start date and the month containing the end date.

Describe alternatives you've considered

Using the components as is

Screenshots or Videos

No response

linear[bot] commented 6 months ago

ENG-738 [Feature Request] Show start month / end month in date range picker dropdown

wingkwong commented 6 months ago

@jdnarvaez is it what you want? If so, this can be achieved by setting visibleMonths to 2 (by default it's 1).

image
jdnarvaez commented 6 months ago

@wingkwong partially. If the end date of the range is more than 1 month out, then by default the end month is not shown on the second panel, only the next continuous month is shown. So if I had a range from April - June, I would want to be able to show April / June next to each other when the dropdown is first opened. The other date picker functions such that when more than one calendar is shown, their months can be incremented / decremented on their own. You'll notice in the screenshot in the post it shows the first month as April and the second month as September.