diff --git a/CHANGELOG.md b/CHANGELOG.md index 943bc61dff9..a434e30f3cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Bug Fixes** +- Fixed bug in `EuiSuperDatePicker` to show correct values of commonly used values in relative tab ([#3106](https://github.com/elastic/eui/pull/3106)) - Fixed race condition in `EuiIcon` when switching from dynamically fetched components ([#3118](https://github.com/elastic/eui/pull/3118)) ## [`21.1.0`](https://github.com/elastic/eui/tree/v21.1.0) diff --git a/src/components/date_picker/super_date_picker/relative_utils.js b/src/components/date_picker/super_date_picker/relative_utils.js index eede3f94f77..adbdb4e8b85 100644 --- a/src/components/date_picker/super_date_picker/relative_utils.js +++ b/src/components/date_picker/super_date_picker/relative_utils.js @@ -12,16 +12,11 @@ export function parseRelativeParts(value) { isString(value) && value.match(/now(([\-\+])([0-9]+)([smhdwMy])(\/[smhdwMy])?)?/); - const isNow = matches && !matches[1]; const operator = matches && matches[2]; const count = matches && matches[3]; const unit = matches && matches[4]; const roundBy = matches && matches[5]; - if (isNow) { - return { count: 0, unit: 's', round: false }; - } - if (count && unit) { const isRounded = roundBy ? true : false; return {