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 handle invalid start and end property values #1544

Merged
merged 2 commits into from
Feb 7, 2019

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Feb 7, 2019

EuiSuperDatePicker start and end props expect string values. This PR makes sure invalid values do not crash the component and allow users to recover by keeping the component working so they can set valid values. The PR updates the docs example so users can set anything for start and end and see how it behaves

dateMath.parse returns undefined for values like now--15m and an invalid moment for values like badinput. The logic had to be updated to ensure the moment returned from dateMath.parse exists and is also valid

screen shot 2019-02-07 at 6 28 42 am

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.

Change LGTM

@nreese nreese merged commit 08e333c into elastic:master Feb 7, 2019
Shigawire pushed a commit to Shigawire/eui that referenced this pull request May 10, 2019
…tic#1544)

* EuiSuperDatePicker handle invalid start and end property values

* change log
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.

2 participants