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]: Date Picker calls onChange twice #14465

Closed
2 tasks done
kglickman opened this issue Aug 18, 2023 · 2 comments · Fixed by #16202
Closed
2 tasks done

[Bug]: Date Picker calls onChange twice #14465

kglickman opened this issue Aug 18, 2023 · 2 comments · Fixed by #16202
Assignees
Labels
adopter: strategic-product Work-stream that directly effects the Product-led Growth initiative. component: date-picker role: dev 🤖 severity: 3 https://ibm.biz/carbon-severity type: bug 🐛

Comments

@kglickman
Copy link

Package

@carbon/react

Browser

Chrome

Package version

1.36.0

React version

18.2.0 (In Stackblitz. We're actually still on 16)

Description

onChange is called both when clicking a date in the calendar and again in onBlur.

Reproduction/example

https://stackblitz.com/edit/github-y8nl8z

Steps to reproduce

Click on the calendar icon in a DatePicker field and select a date. See the onChange console message printed. Click off the DatePicker such that it loses focus. See that the onChange is called again.

This is a problem because a xhr request is launched with the onChange so it's happening twice.

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

OpenPages

Code of Conduct

@github-actions github-actions bot added the adopter: strategic-product Work-stream that directly effects the Product-led Growth initiative. label Aug 18, 2023
@tw15egan tw15egan changed the title [Bug]: [Bug]: Date Picker calls onChange twice Aug 22, 2023
@azizChebbi
Copy link
Contributor

can I get assigned ?

@tw15egan
Copy link
Member

All yours @azizChebbi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adopter: strategic-product Work-stream that directly effects the Product-led Growth initiative. component: date-picker role: dev 🤖 severity: 3 https://ibm.biz/carbon-severity type: bug 🐛
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants