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 shows both dates in first dat #16960

Closed
2 tasks done
josiahhk opened this issue Jul 15, 2024 · 2 comments
Closed
2 tasks done

[Bug]: Datepicker range shows both dates in first dat #16960

josiahhk opened this issue Jul 15, 2024 · 2 comments

Comments

@josiahhk
Copy link

Package

@carbon/react

Browser

Chrome

Package version

1.61

React version

18.3.1

Description

When using the DatePicker range with calendar and passing in the selected date array as a value, the first datepicker displays "[startDate] to [endDate]" instead of just the startDate

image

This is the same issue as: #4803
It appears to have started occurring again around version 1.56.

Reproduction/example

https://codesandbox.io/s/datepicker-issue-pc8ktz?file=/src/index.js

Steps to reproduce

  1. Use the code from the storybook to set up a date picker range with calendar.
  2. Save the value of the onChange to state and pass that state in as a value (I don't think the value strictly needs to be saved in state. Just as long as you can get two values in an array passed in
  3. When the code is running, select a range of dates. It does not matter which dates.
  4. Notice that the first of the two date picker boxes in the range displays "[dateOne] to [dateTwo]" instead of just "[dateOne]"

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

@alisonjoseph
Copy link
Member

This was just fixed and will be included in our release this week. #16936

@alisonjoseph alisonjoseph closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2024
@github-project-automation github-project-automation bot moved this to ✅ Done in Design System Jul 15, 2024
@josiahhk
Copy link
Author

Perfect, thank you!

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

No branches or pull requests

2 participants