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: Range selectionMode does not allow multi-year (month?) #6554

Closed
mgmodell opened this issue May 3, 2024 · 11 comments
Closed

Calendar: Range selectionMode does not allow multi-year (month?) #6554

mgmodell opened this issue May 3, 2024 · 11 comments
Labels
Resolution: Invalid Issue or pull request is not valid in the latest version

Comments

@mgmodell
Copy link

mgmodell commented May 3, 2024

Describe the bug

I just upgraded to the latest PrimeReact and tests which used to pass now fail. Specifically, I use the range selectionMode on the Calendar component and I want to enter the range: "07/29/1984 - 02/10/1985" but it will not accept it either as text or via popup.

  1. Using the text input removes the second date as soon as I enter the '5' in 1985. This seems to happen as soon as any second date is completed.

  2. If I use the popup, as soon as I switch the month, it selects a date in the new month and does not function properly (e.g. when I navigate from July 1984 to August 1984, it selects a date and closes). When I open it to try to repair the issue, it wants to start over with the start date.

The attached Stackblitz is really just a copy of the one found on your page with readOnlyInput removed, but you can add it back in and still demonstrate #2.

Reproducer

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

PrimeReact version

10.6.4

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

Chrome 124.0.6367.119

Steps to reproduce the behavior

  1. Click the Calendar input box.
  2. Type in:

07/29/1984 - 02/10/1985

  1. See that only 07/29/1984 remains.

Expected behavior

Both dates should be properly accepted and listed in the input box.

@mgmodell mgmodell 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 3, 2024
@melloware
Copy link
Member

i just tried your reproduce is it possible its fixed with 10.6.5 because it seems to be working now?

@melloware
Copy link
Member

No its still a bug I see your same behavior.

@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 3, 2024
@melloware
Copy link
Member

@KirilCycle i think this bug is related to your fix here: #6478

@KirilCycle
Copy link
Contributor

@KirilCycle i think this bug is related to your fix here: #6478

Ill take a look

@KirilCycle
Copy link
Contributor

@melloware that's weird, I pulled the latest changes, switched to the prod branch and can't reproduce 1 typing issue

Screen.Recording.2024-05-03.at.20.46.21.mov

@melloware
Copy link
Member

@KirilCycle try it with the mouse too, when I select a date, then try to advance to the next month to pick another date it auto picks the next date and closes the calendar?

@KirilCycle
Copy link
Contributor

KirilCycle commented May 3, 2024

@melloware I can easily reproduce both of them on the stack, but locally they work fine, I checked the pulled changes twice recently, should I try to run the build?

Screen.Recording.2024-05-03.at.20.55.14.mov

@melloware
Copy link
Member

Oh try this... temporarily change in .next.config.js the strictMode to false which emulates production mode . Then run npm run dev again.

@KirilCycle
Copy link
Contributor

KirilCycle commented May 3, 2024

Still, cant reproduce, version is 10.6.5

@melloware
Copy link
Member

it might be a whacky Stackblitz thing. @mgmodell can you try your real project with 10.6.5?

@mgmodell
Copy link
Author

mgmodell commented May 3, 2024

I just updated in my project and it appears to be resolved in 10.6.5. Thanks!

@mgmodell mgmodell closed this as completed May 3, 2024
@melloware melloware added Resolution: Invalid Issue or pull request is not valid in the latest version and removed Type: Bug Issue contains a defect related to a specific component. labels May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Invalid Issue or pull request is not valid in the latest version
Projects
None yet
Development

No branches or pull requests

3 participants