Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React
https://reactdatepicker.com/
MIT License
8.07k stars 2.24k forks source link

Dropdowns on multi month views are strange #4222

Open RHeynsZa opened 1 year ago

RHeynsZa commented 1 year ago

Describe the bug So the layout is weird with the month and year dropdowns when you have two months (and more I presume) listed.

This issue was reported before: https://github.com/Hacker0x01/react-datepicker/issues/790

My first thought it was a bug, as I'd expect a dropdown per calendar, so I pulled te repo to contribute.

However, I found a test in test/calendar_test.js:791 that explicitly states this behaviour:

  it("should show only one month dropdown menu if toggled on and multiple month mode on", function () {
    const calendar = getCalendar({ showMonthDropdown: true, monthsShown: 2 });
    const monthReadView = calendar.find(MonthDropdown);
    expect(monthReadView).to.have.length(1);
  });

Expected behavior You tell me what the expected behaviour should be. I dont mind contributing a solution.

A: image

B: image

Screenshots image

Desktop (please complete the following information): Not relative

Additional context Add any other context about the problem here.

github-actions[bot] commented 4 months ago

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