Skip to content

Selected start month is visible in next and previous years #5637

@bogdankol

Description

@bogdankol

Describe the bug
A clear and concise description of what the bug is.

You can see this on https://reactdatepicker.com/#example-date-range -> Exclude Months in Range Month Picker.
If you select a range of months the starting month is being seen in next and previous years thought it is not in picked date range

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://reactdatepicker.com/#example-date-range -> Exclude Months in Range Month Picker
  2. Click on calendar range field
  3. Set a range of month for example from Jan 2025 to Sep 2025 and press buttons to pick any next or previuos year
  4. You should see that starting month is highlighted in wrong years

Expected behavior
A clear and concise description of what you expected to happen.

In years that are not in selected months range you shouldn't see any month highlighted

Screenshots
If applicable, add screenshots to help explain your problem.

Image

Image

Image

Desktop (please complete the following information):

  • OS: Win11
  • Browser chrome
  • Version 136.0.7103

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions