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

fix(date-picker): clearing input and selecting a date #17669

Conversation

ariellalgilmore
Copy link
Member

Closes #14529

When opening the date-picker, then clearing the input in date-picker and then clicking on a value the date-picker would still show empty.

Screen.Recording.2024-10-01.at.9.45.51.AM.mov
Screen.Recording.2024-10-01.at.9.44.49.AM.mov

Changelog

Changed

  • updated handleOnChange and added a keyPress event listener

Testing / Reviewing

make sure tests still pass. make sure works similiarly to flatpickr examples

Open storybook

  • go to date-picker stories
  • open the date picker select a date
  • open again and clear the current date
  • while it is still open click on a date
  • date-picker should hold that current value in the input

Copy link

netlify bot commented Oct 7, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit c3ee37e
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6703f6eef072b40008ee8b5e
😎 Deploy Preview https://deploy-preview-17669--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 7, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c3ee37e
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6703f6ee40ac100008bf43f6
😎 Deploy Preview https://deploy-preview-17669--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 7, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 3c6ca51
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6703f6f67d57320008921513
😎 Deploy Preview https://deploy-preview-17669--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.10%. Comparing base (eeaebc9) to head (3c6ca51).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17669      +/-   ##
==========================================
+ Coverage   77.07%   77.10%   +0.02%     
==========================================
  Files         409      409              
  Lines       14021    14027       +6     
  Branches     4307     4330      +23     
==========================================
+ Hits        10807    10815       +8     
+ Misses       3044     3041       -3     
- Partials      170      171       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

netlify bot commented Oct 7, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3c6ca51
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6703f6f6e4e167000880dcb6
😎 Deploy Preview https://deploy-preview-17669--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ariellalgilmore ariellalgilmore marked this pull request as ready for review October 7, 2024 15:16
@ariellalgilmore ariellalgilmore requested a review from a team as a code owner October 7, 2024 15:16
Copy link
Contributor

@2nikhiltom 2nikhiltom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat fix 🔥

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tay1orjones tay1orjones enabled auto-merge October 9, 2024 13:28
@tay1orjones tay1orjones added this pull request to the merge queue Oct 9, 2024
Merged via the queue into carbon-design-system:main with commit f10cb92 Oct 9, 2024
36 checks passed
@carbon-automation
Copy link
Contributor

Hey there! v11.68.0 was just released that references this issue/PR.

@ariellalgilmore ariellalgilmore deleted the fix/date-picker-closing-when-clearing branch October 10, 2024 22:43
annawen1 pushed a commit to annawen1/carbon that referenced this pull request Oct 11, 2024
…system#17669)

* fix(date-picker): keep open when clearing input

* fix(date-picker): add type single to condition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants