Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar: Incorrect styling when selecting month/year range #6653

Closed
vnedevaa opened this issue May 22, 2024 · 3 comments · Fixed by #6759 or #6760
Closed

Calendar: Incorrect styling when selecting month/year range #6653

vnedevaa opened this issue May 22, 2024 · 3 comments · Fixed by #6759 or #6760
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@vnedevaa
Copy link

Describe the bug

There is an issue with the Calendar component when using the properties view='month', and selectionMode='range'. When selecting months in the following sequence - selecting January and then a later month like May - the styling appears correctly. The problem arises when I first select a later month and then an earlier one, such as selecting May and then February. Although the range is successfully built, the styling is not applied correctly, and it appears as if the user has selected only one month instead of two.
Screenshot 2024-05-17 at 17 01 20
Screenshot 2024-05-17 at 17 01 09

Reproducer

https://stackblitz.com/edit/hyhoxe?file=src%2FApp.jsx

PrimeReact version

10.5.0

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Open calendar
  2. Select May 2024
  3. Select February 2024

Only February is highlighted and May is not focused. The range is correctly filled.

Expected behavior

Second month (May 2024) should be focused as well.

@vnedevaa vnedevaa added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 22, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 22, 2024
@melloware melloware changed the title Incorrect styling when selecting month range in PrimeReact Calendar Component Calendar: Incorrect styling when selecting month range May 22, 2024
@jmelich
Copy link

jmelich commented Jun 11, 2024

same issue here! 🙋

@KumJungMin
Copy link
Contributor

I would like to request a bug fix PR :)

@melloware melloware changed the title Calendar: Incorrect styling when selecting month range Calendar: Incorrect styling when selecting month/year range Jun 14, 2024
@melloware melloware added this to the 10.7.0 milestone Jun 14, 2024
@melloware
Copy link
Member

Thanks for fixing both month and year!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
4 participants