diff --git a/CHANGELOG.md b/CHANGELOG.md index 03c2454b4df..9700d78aeef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ **Note: this release is a backport containing changes originally made in `9.0.0`, `9.1.0`, and `9.4.0`** -- Adjusted the dark theme palette to have a slight blue titn ([#1691](https://github.com/elastic/eui/pull/1691)) +- Adjusted the dark theme palette to have a slight blue tint ([#1691](https://github.com/elastic/eui/pull/1691)) +- Added button to `EuiSuperDatePicker`'s “Now” tab to trigger the "now" time selection ([#1620](https://github.com/elastic/eui/pull/1620)) **Bug fixes** diff --git a/src/components/date_picker/super_date_picker/date_popover/_date_popover_content.scss b/src/components/date_picker/super_date_picker/date_popover/_date_popover_content.scss index ca1f42ecb23..3bc5a8dc391 100644 --- a/src/components/date_picker/super_date_picker/date_popover/_date_popover_content.scss +++ b/src/components/date_picker/super_date_picker/date_popover/_date_popover_content.scss @@ -6,3 +6,7 @@ .euiDatePopoverContent__padded { padding: $euiSizeS; } + +.euiDatePopoverContent__padded--large { + padding: $euiSize; +} diff --git a/src/components/date_picker/super_date_picker/date_popover/date_popover_content.js b/src/components/date_picker/super_date_picker/date_popover/date_popover_content.js index 1e13662bae3..75e6482da3f 100644 --- a/src/components/date_picker/super_date_picker/date_popover/date_popover_content.js +++ b/src/components/date_picker/super_date_picker/date_popover/date_popover_content.js @@ -4,6 +4,7 @@ import React from 'react'; import { EuiTabbedContent } from '../../../tabs'; import { EuiText } from '../../../text'; +import { EuiButton } from '../../../button'; import { EuiAbsoluteTab } from './absolute_tab'; import { EuiRelativeTab } from './relative_tab'; @@ -25,9 +26,6 @@ export function EuiDatePopoverContent({ value, roundUp, onChange, dateFormat }) case DATE_MODES.RELATIVE: onChange(toRelativeString(value)); break; - case DATE_MODES.NOW: - onChange('now'); - break; } }; @@ -62,11 +60,20 @@ export function EuiDatePopoverContent({ value, roundUp, onChange, dateFormat }) id: DATE_MODES.NOW, name: 'Now', content: ( - +

- Setting the time to "Now" means that on every refresh + Setting the time to "now" means that on every refresh this time will be set to the time of the refresh.

+ onChange('now')} + fullWidth + size="s" + fill + > + Set date and time to now +
), 'data-test-subj': 'superDatePickerNowTab',