Skip to content

[EuiSuperDatePicker] date popover onChange should only accept strings#3460

Merged
thompsongl merged 6 commits intoelastic:masterfrom
thompsongl:hotfix/absolute-moment
May 14, 2020
Merged

[EuiSuperDatePicker] date popover onChange should only accept strings#3460
thompsongl merged 6 commits intoelastic:masterfrom
thompsongl:hotfix/absolute-moment

Conversation

@thompsongl
Copy link
Copy Markdown
Contributor

@thompsongl thompsongl commented May 11, 2020

Summary

Manual datetime entry via the input in the 'Absolute' tab would result in a Moment object being passed up through the component and causing errors. The the onChange event parameter for date_popover_content was mistyped as allowing Moment objects when in all cases the value is treated as a string.

This restricts the interface to the expected string type and uses an ISO string in place of the full Moment object.

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation examples
- [ ] Added or updated jest tests

  • Checked for breaking changes and labeled appropriately

- [ ] Checked for accessibility including keyboard-only and screenreader modes

  • A changelog entry exists and is marked appropriately

@thompsongl thompsongl requested a review from chandlerprall May 11, 2020 19:24
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3460/

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3460/

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3460/

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3460/

Copy link
Copy Markdown
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Changes LGTM. Tested manual entry in the Absolute tab and it's not broken anymore 🎉

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3460/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants