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

feat(DatePicker): add flatpickr allowInput passthrough #7037

Merged

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Oct 13, 2020

Closes #7007

This PR allows the user to disable allowInput on the flatpickr instance since we enable it by default. Since we do not support all of flatpickr's configurable options I opted to add this one prop rather than allowing a flatpickrOptions config object

Changelog

New

  • allowInput prop for controlling flatpickr, defaults to true

Changed

  • flatpickr locale comments. The comments did not match the proptype definition so I updated them to be correct and a little more manageable

Testing / Reviewing

Pass in a value for the allowInput prop and verify that it works as expected (user is or isn't able to type into the flatpickr input field). Since flatpickr is instantiated on mount, I did not create a storybook knob for this

@netlify
Copy link

netlify bot commented Oct 13, 2020

Deploy preview for carbon-elements ready!

Built with commit c8bcbc0

https://deploy-preview-7037--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Oct 13, 2020

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit c8bcbc0

https://deploy-preview-7037--carbon-components-react.netlify.app

@kodiakhq kodiakhq bot merged commit 5ee9cd7 into carbon-design-system:master Oct 14, 2020
@emyarod emyarod deleted the 7007-flatpickr-allowinput branch October 15, 2020 17:09
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.

Provide a feature to disable just the input field and not the calendar in Date picker.
3 participants