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: Reset date range calendar when value is empty string or array #17889

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

dedanade
Copy link
Contributor

Closes #17702

Fix issue when a user resets datepicker calendar using an empty string, array, or two empty strings in an array.

Changelog

New

  • {{new thing}}

Changed

  • {{change thing}}

Removed

  • {{removed thing}}

Testing / Reviewing

Create a button to reset the date range in DatePicker.stories to reset the calendar with a daterange value like this https://stackblitz.com/edit/github-cmfaqv?file=src%2FApp.jsx.

Select the start and end date, click on the reset button you created above and reselect start date again to notice the end date doesn't automatically populate from the previous selection.

@dedanade dedanade requested a review from a team as a code owner October 28, 2024 00:48
@dedanade dedanade requested review from emyarod and guidari October 28, 2024 00:48
Copy link
Contributor

github-actions bot commented Oct 28, 2024

All contributors have signed the DCO.
Posted by the DCO Assistant Lite bot.

Copy link

netlify bot commented Oct 28, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 410be25
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/678024e09c52610008db2f66
😎 Deploy Preview https://deploy-preview-17889--v11-carbon-web-components.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.

@dedanade
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

Copy link

netlify bot commented Oct 28, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 410be25
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/678024e0d8f44b0008a74b84
😎 Deploy Preview https://deploy-preview-17889--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
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

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

it looks like VS Code is adding .history to the repo but we probably don't need to commit those files!

@dedanade
Copy link
Contributor Author

dedanade commented Nov 4, 2024

it looks like VS Code is adding .history to the repo but we probably don't need to commit those files!

Hi @emyarod, Apologies, This is coming from a different commit that has been fixed and unrelated to this task. It looks good to me now.

Copy link

netlify bot commented Nov 5, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 410be25
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/678024e0eb92e30008d8dba8
😎 Deploy Preview https://deploy-preview-17889--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.

@guidari
Copy link
Contributor

guidari commented Nov 21, 2024

Hey @dedanade The Stackblitz does not work.
Can you create an example story for us to test, please

@dedanade
Copy link
Contributor Author

Hi @guidari , to test for the issue, kindly check https://stackblitz.com/edit/github-cmfaqv?file=src%2FApp.jsx

Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

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

I pull down locally and created a storybook example to test the fix.

LGTM 🚀 Thanks for opening that.

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
Copy link
Member

@dedanade your commits were made with username/email creds that don't match your github profile, so the DCO bot doesn't see this "user" as having signed the DCO. We can merge this manually to override the failing check, but just something to know for the future. Thanks again for this fix!

@dedanade
Copy link
Contributor Author

dedanade commented Dec 4, 2024

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants