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

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

Merged
merged 6 commits into from
May 14, 2020

Conversation

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

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

@kibanamachine
Copy link

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

@kibanamachine
Copy link

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

@kibanamachine
Copy link

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

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

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