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] Clicking start/end inputs doesn't display the correct relative value #1600

Closed
formgeist opened this issue Feb 26, 2019 · 2 comments · Fixed by #3106
Closed

Comments

@formgeist
Copy link
Contributor

When clicking the start/end range values, I’d expect the editor to show the value that was clicked - either as an absolute or relative value. Instead it just defaults to “0 seconds ago”. This usually happens with "commonly used" inputs i.e. month to date.

kapture 2019-02-26 at 13 46 20

@cchaos
Copy link
Contributor

cchaos commented Feb 26, 2019

It looks like it specifically doesn't understand the "Commonly used" items except for "Yesterday". Though most other cases work just fine.

cc @nreese

@nreese
Copy link
Contributor

nreese commented Feb 26, 2019

Looks like there is a bug in https://github.com/elastic/eui/blob/master/src/components/date_picker/super_date_picker/relative_utils.js#L10. Instead of parsing values of now/M, and grabbing the units, its just returning { count: 0, unit: 's', round: false }

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

Successfully merging a pull request may close this issue.

3 participants