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): support changing date format #4856

Conversation

asudoh
Copy link
Contributor

@asudoh asudoh commented Dec 11, 2019

This change allows change in dateFormat prop after initialization reflected correctly to the underlying Flatpickr.

Fixes #4848.

Changelog

New

  • Code to reflect change in dateFormat after initialization to Flatpickr.

Testing / Reviewing

Testing should make sure <DatePicker> is not broken.

This change allows change in `dateFormat` prop after initialization
reflected correctly to the underlying Flatpickr.

Fixes carbon-design-system#4848.
@netlify
Copy link

netlify bot commented Dec 11, 2019

Deploy preview for the-carbon-components ready!

Built with commit d2cfb15

https://deploy-preview-4856--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Dec 11, 2019

Deploy preview for carbon-components-react ready!

Built with commit d2cfb15

https://deploy-preview-4856--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Dec 11, 2019

Deploy preview for carbon-elements ready!

Built with commit d2cfb15

https://deploy-preview-4856--carbon-elements.netlify.com

@figfofu
Copy link
Contributor

figfofu commented Jan 6, 2020

Can anybody review and merge this PR?

@asudoh asudoh merged commit 1c763f8 into carbon-design-system:master Jan 6, 2020
@asudoh asudoh deleted the date-picker-change-date-format-after-initialization branch January 6, 2020 22:33
figfofu pushed a commit to figfofu/carbon that referenced this pull request Jan 7, 2020
Since flatpickr does not automatically update minDate and maxDate,
we need to explicitly do it when the user makes any change in the props
by using set(option, value) method from flatpickr
Aligned to the change in carbon-design-system#4856
figfofu pushed a commit to figfofu/carbon that referenced this pull request Jan 7, 2020
Since flatpickr does not automatically update minDate and maxDate,
we need to explicitly do it when the user makes any change in the props
by using set(option, value) method from flatpickr
Aligned to the change in carbon-design-system#4856
joshblack pushed a commit to joshblack/carbon that referenced this pull request Jan 13, 2020
…4856)

This change allows change in `dateFormat` prop after initialization
reflected correctly to the underlying Flatpickr.
joshblack pushed a commit to joshblack/carbon that referenced this pull request Jan 14, 2020
…4856)

This change allows change in `dateFormat` prop after initialization
reflected correctly to the underlying Flatpickr.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants