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(DatePicker): fix reference for onOpen #13800

Merged
merged 2 commits into from
May 24, 2023

Conversation

guidari
Copy link
Contributor

@guidari guidari commented May 15, 2023

Closes #13793

Fixed the reference in the onOpen prop. Before it was creating a new function that was returning the onChange function, and now the onChange is saving the reference without creating a new function.

Testing / Reviewing

Go to DatePicker.stories.js and add a console.log

Example:

export const SingleWithCalendar = () => (
  <DatePicker datePickerType="single" onOpen={() => console.log('onOpen')}>
    <DatePickerInput
      placeholder="mm/dd/yyyy"
      labelText="Date Picker label"
      id="date-picker-single"
      size="md"
    />
  </DatePicker>
);

@netlify
Copy link

netlify bot commented May 15, 2023

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d60cbf7
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/646e24a383dfbc00086e82c8
😎 Deploy Preview https://deploy-preview-13800--carbon-components-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 settings.

@netlify
Copy link

netlify bot commented May 15, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit d60cbf7
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/646e24a359c3da0008220b26
😎 Deploy Preview https://deploy-preview-13800--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 settings.

@kodiakhq kodiakhq bot merged commit 71412d8 into carbon-design-system:main May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Datepicker onOpen not called
3 participants