react-calendar icon indicating copy to clipboard operation
react-calendar copied to clipboard

Dropdown select for month and year

Open kennyjwilli opened this issue 4 years ago • 6 comments

Is it possible to change the way you navigate from month to month & year to year to simply be a dropdown? I find the entire calendar switching views jarring. I'd like to have it so when you click on the year, it will simply show a dropdown of years to select. When you click on the month, it shows a dropdown of the months.

kennyjwilli avatar Oct 30 '19 22:10 kennyjwilli

Hi, that is quite a complicated problem. In current React-Calendar architecture, calendar layout tied closely with its logic in root component. I think it would make sense to split the view from the logic, essentially making it possible to replace the whole view logic - but that would mean you would need to handle displaying months, years, decades etc. on your own, too. This would be helpful for testability, though!

Other way is to just create renderNavigation prop and allow people to redefine the logic of rendering navigation, and making sure that existing elements are exported for reuse.

What do you think?

wojtekmaj avatar Nov 10 '19 11:11 wojtekmaj

Kinda related to #193

wojtekmaj avatar Nov 11 '19 20:11 wojtekmaj

Splitting the view from the logic makes sense.

kennyjwilli avatar Nov 21 '19 15:11 kennyjwilli

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

github-actions[bot] avatar Dec 06 '21 00:12 github-actions[bot]

Still interested in this.

kennyjwilli avatar Dec 06 '21 01:12 kennyjwilli

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

github-actions[bot] avatar Mar 14 '22 01:03 github-actions[bot]