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

Closed
2 tasks done
jackpronske opened this issue May 14, 2024 · 3 comments · Fixed by #16653
Closed
2 tasks done

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

jackpronske opened this issue May 14, 2024 · 3 comments · Fixed by #16653

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 https://ibm.biz/carbon-severity label May 16, 2024
@tay1orjones tay1orjones moved this to ⏱ Backlog in Design System May 16, 2024
@riddhybansal riddhybansal moved this from ⏱ Backlog to 🚦 In Review in Design System Jun 4, 2024
@github-project-automation github-project-automation bot moved this from 🚦 In Review to ✅ Done in Design System Jun 4, 2024
@bendiggle
Copy link

I still don't think all of the above issues have been fixed after updated to 1.59.0. As you can see from the screenshot, we can still see that the start date input displays the "to" text with the end date.
Screenshot 2024-06-14 at 08 59 27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants