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

[Bug]: DatePicker Range has unintended behavior when selecting dates #16473

Open
2 tasks done
jackpronske opened this issue May 14, 2024 · 2 comments
Open
2 tasks done
Assignees
Labels

Comments

@jackpronske
Copy link

Package

@carbon/react

Browser

Chrome

Package version

1.57.0

React version

16.14.0

Description

This bug is in 1.57.0, but not in any previous versions. (currently downgraded to >=1.56.0 and bug was not present)
When selecting first date in date range, calendar closes instead of staying open for user to pick second date in date range.
When selecting second date range, the first date range contains BOTH first and second dates in selection.
We're using calendar as controlled component, with onChange functions and value properties. Again, this has worked until the recent update in 1.57.0.

Reproduction/example

https://stackblitz.com/edit/github-sf1rjr?file=src%2FApp.jsx,src%2Fmain.jsx

Steps to reproduce

-click start date, select date (note that calendar closes, this is not correct calendar function)
-select end date
-user can see that start date contains string "05/13/2024 to 05/14/2024", which is not correct calendar function

Suggested Severity

Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

@2nikhiltom
Copy link
Contributor

2nikhiltom commented May 15, 2024

Hi @jackpronske

I reviewed the stackblitz link you shared

Observations

  • The calendar remains open until both the start and end dates are selected.
  • The behavior of calendar to close once you've initially selected a start and end date and then proceed to change either of these dates. Feels like a bug

This bug is in 1.57.0, but not in any previous versions. (currently downgraded to >=1.56.0 and bug was not present)

  • I have verified the functionality with 1.56.0 version as well , the behavior remain the same

@jackpronske
Copy link
Author

Good morning.

My link apparently didn't save the correct reflection of the bug. I have recreated and here (hopefully) the correct link
https://stackblitz.com/edit/github-sf1rjr?file=src%2FApp.jsx

@2nikhiltom 2nikhiltom added the severity: 3 User can complete task, and/or has a workaround label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ⏱ Backlog
Development

No branches or pull requests

3 participants