Skip to content

[Unified Search] DateRangePicker integration#260163

Merged
acstll merged 97 commits into
elastic:mainfrom
acstll:unified-search/date-range-picker-integration
Apr 12, 2026
Merged

[Unified Search] DateRangePicker integration#260163
acstll merged 97 commits into
elastic:mainfrom
acstll:unified-search/date-range-picker-integration

Conversation

@acstll
Copy link
Copy Markdown
Contributor

@acstll acstll commented Mar 29, 2026

Summary

Replaces EuiSuperDatePicker with the new DateRangePicker from @kbn/date-range-picker in QueryBarTopRow, only for Discover and Dashboards, behind a feature flag.

🔗 Cloud deployment preview (ping me for credentials)

Resolves https://github.com/elastic/eui-private/issues/521

Screenshots Screenshot 2026-03-30 at 22 59 23 Screenshot 2026-03-30 at 22 59 55

Changes

Note

Initially this PR introduced a UI setting as a mean for users to roll back to the old picker, this was replaced with a feature flag (off by default) for a controlled/granular rollout 3e87774

  • Added unifiedSearch.newDateRangePickerEnabled feature flag, to roll out the new time picker in steps (defaults to false)
  • Added new enableDateRangePicker prop to SearchBar and QueryBarTopRow, to scope the new time picker to only Discover and Dashboard
  • Updated tests with a dual approach in page objects (FTR and Scout) so testing both the old and new time pickers is supported
  • Fixed syncing for auto-refresh in DateRangePicker (fdbf42e)

Tip

To test the new time picker locally, override the feature flag in config/kibana.dev.yml

feature_flags.overrides:
    unifiedSearch.newDateRangePickerEnabled: true

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Risk is low:

  • EuiSuperDatePicker is replaced by DateRangePicker, which exposes a very simliar API and the change is largely a swap of implementations behind the same interface
  • FTR and Scout page objects were updated to cover both the old and new picker paths; the flaky test runner showed no regressions across 5 FTR configs (125 runs) and 15 Scout runs
  • The new picker is only active when unifiedSearch.newDateRangePickerEnabled: true is explicitly set; all users get the existing EuiSuperDatePicker until the flag is enabled

Release note

Introduces a new date range picker in Discover and Dashboard, in technical preview behind a feature flag. The new picker lets you type time ranges directly into a text input using flexible formats — combine relative and absolute dates like 8 weeks ago to Apr 7, 2026, use plain expressions like last 20 minutes, or use the new shorthand syntax like -6mo for the last 6 months. It supports the same quick presets, absolute dates, recently used ranges, and auto-refresh as before.

acstll and others added 9 commits March 29, 2026 08:48
…presets, collapsed mode

- Support shorthands for named ranges and normalize shorthand units
- Improve parsing of absolute formats and prettify input values
- Add timePrecision setting and apply it to date display formats
- Standardize absolute date formatting across all input sources
- Fix dateMath output and roundRelativeTime for preset selections
- Handle "Browser" as timeZone value
- Improve display of relative times (idle state)
- Show custom time range item in the menu
- Polish Settings and Documentation panels
- Improve input width for width=auto
- Prop collapsed is not a boolean anymore; introduce container query logic
- Fix: Apply button in Calendar panel enabled on initial render
- Fix: Disable arrow key selection after input is cleared
- Update query string in link to advanced settings
- Add missing data-test-subj attributes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…uery bar

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…elements and data-date-range to control button

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…pper

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…and legacy EuiSuperDatePicker

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@acstll acstll self-assigned this Mar 29, 2026
@acstll acstll added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Mar 29, 2026
@acstll
Copy link
Copy Markdown
Contributor Author

acstll commented Mar 29, 2026

@elasticmachine merge upstream

elasticmachine and others added 7 commits March 29, 2026 04:27
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… and legacy EuiSuperDatePicker

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…kbn-date-range-picker

The unified_search global query bar now uses kbn-date-range-picker instead
of EuiSuperDatePicker, so superDatePicker* selectors no longer exist for
the global time range control.

Changes:
- screens/date_picker.ts: add dateRangePicker* selectors for the new picker
- tasks/date_picker.ts: branch setStartDate, setEndDate, setEndDateNow and
  showStartEndDate — global container (GLOBAL_FILTERS_CONTAINER) uses the
  new picker flow (open panel → custom range → set date → apply), while
  any other container (e.g. Timeline local query bar) keeps the legacy
  EuiSuperDatePicker flow unchanged
- screens/threat_intelligence/indicators.ts: update TIME_RANGE_PICKER from
  superDatePickerToggleQuickMenuButton to dateRangePickerControlButton

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… legacy CI verification

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@acstll
Copy link
Copy Markdown
Contributor Author

acstll commented Mar 29, 2026

buildkite test this

@acstll
Copy link
Copy Markdown
Contributor Author

acstll commented Mar 29, 2026

buildkite test this

Remove container-type: inline-size from the query bar wrapper and set collapsed to 'never'. The container query layout breaks pages like Dataset Quality that embed the query bar in constrained layouts. Collapsed mode can be re-enabled later on with a different approach.
@acstll
Copy link
Copy Markdown
Contributor Author

acstll commented Mar 29, 2026

buildkite test this

acstll and others added 3 commits March 29, 2026 22:45
Previously, absolute dates were returned as raw input text (e.g.
"Feb 3 2016, 19:00") in timeRange.start/end and onChange. They should
always be ISO or dateMath strings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…te assertions

Use moment.utc for ISO string formatting and comparison. Accept both
legacy humanized text and dateMath for relative date assertions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@acstll
Copy link
Copy Markdown
Contributor Author

acstll commented Mar 29, 2026

buildkite test this

@kertal kertal added the Feature:Unified search Unified search related tasks label Apr 10, 2026
Comment on lines +43 to +70
await getTestSubjLocator('superDatePickerToggleQuickMenuButton').waitFor();
await getTestSubjLocator('superDatePickerToggleQuickMenuButton').waitFor({ state: 'visible' });
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ state: 'visible' } is a default Playwright check, we can leave it as-is.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in f362b6d

Comment on lines +176 to +177
await datePart.getByRole('button', { name: 'Absolute' }).click();
const input = datePart.getByRole('textbox');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any chance to add data-test-subj for both elements: Streams App has a page with multiple date pickers, Playwright will complain with 2 locators matching

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in f362b6d

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#11512

[✅] x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts: 25/25 tests passed.

see run history

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#11513

[✅] src/platform/plugins/shared/discover/test/scout/ui/parallel.playwright.config.ts: 25/25 tests passed.

see run history

- Remove redundant `{ state: 'visible' }` from waitFor() calls (Playwright default)
- Use data-test-subj selectors (`dateRangePicker${side}AbsoluteTab`, `dateRangePicker${side}AbsoluteInput`) instead of getByRole in setDatePart to avoid ambiguity with multiple date pickers on a page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#11519

[✅] src/platform/plugins/shared/dashboard/test/scout/ui/parallel.playwright.config.ts: 25/25 tests passed.
[✅] src/platform/test/functional/apps/dashboard/group3/config.ts: 25/25 tests passed.

see run history

@dmlemeshko dmlemeshko self-requested a review April 10, 2026 14:05
@acstll
Copy link
Copy Markdown
Contributor Author

acstll commented Apr 10, 2026

@elasticmachine merge upstream

@acstll
Copy link
Copy Markdown
Contributor Author

acstll commented Apr 11, 2026

@elasticmachine merge upstream

@acstll
Copy link
Copy Markdown
Contributor Author

acstll commented Apr 12, 2026

@elasticmachine merge upstream

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Apr 12, 2026

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #11 / FilterLabel should render properly
  • [job] [logs] Jest Tests #11 / FilterLabel should render properly

History

cc @acstll

@acstll acstll merged commit 64f678d into elastic:main Apr 12, 2026
18 checks passed
michel-laterman pushed a commit to michel-laterman/kibana that referenced this pull request Apr 13, 2026
## Summary

Replaces
[`EuiSuperDatePicker`](https://eui.elastic.co/docs/components/forms/date-and-time/super-date-picker/)
with the new
[`DateRangePicker`](https://ci-artifacts.kibana.dev/storybooks/main/shared_ux/index.html?path=/story/date-time-daterangepicker--playground)
from `@kbn/date-range-picker` in `QueryBarTopRow`, only for Discover and
Dashboards, behind a feature flag.

~~🔗 [Cloud deployment
preview](https://kibana-pr-260163-485d2f.kb.us-west2.gcp.elastic-cloud.com/)
(ping me for credentials)~~

Resolves elastic/eui-private#521

<details>
<summary>Screenshots</summary>

<img width="730" height="644" alt="Screenshot 2026-03-30 at 22 59 23"
src="https://github.com/user-attachments/assets/97a11c72-ce6c-43ca-8f8b-f3d5d2c91cd2"
/>

<img width="730" height="644" alt="Screenshot 2026-03-30 at 22 59 55"
src="https://github.com/user-attachments/assets/51ef9e33-4a68-427c-ba46-cfe828e610c1"
/>

</details>

### Changes

>[!NOTE]
> Initially this PR introduced a UI setting as a mean for users to roll
back to the old picker, this was replaced with a feature flag (off by
default) for a controlled/granular rollout
3e87774

- **Added `unifiedSearch.newDateRangePickerEnabled` feature flag**, to
roll out the new time picker in steps (defaults to `false`)
- Added new `enableDateRangePicker` prop to `SearchBar` and
`QueryBarTopRow`, to **scope the new time picker to only Discover and
Dashboard**
- **Updated tests with a dual approach** in page objects (FTR and Scout)
so testing both the old and new time pickers is supported
- **Fixed syncing for auto-refresh** in `DateRangePicker`
(fdbf42e)

>[!TIP]
> To test the new time picker locally, override the feature flag in
`config/kibana.dev.yml`

```yaml
feature_flags.overrides:
    unifiedSearch.newDateRangePickerEnabled: true
```

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Risk is low:
- `EuiSuperDatePicker` is replaced by `DateRangePicker`, which exposes a
very simliar API and the change is largely a swap of implementations
behind the same interface
- FTR and Scout page objects were updated to cover both the old and new
picker paths; the flaky test runner showed no regressions across 5 FTR
configs (125 runs) and 15 Scout runs
- The new picker is only active when
`unifiedSearch.newDateRangePickerEnabled: true` is explicitly set; all
users get the existing `EuiSuperDatePicker` until the flag is enabled

## Release note

Introduces a new date range picker in Discover and Dashboard, in
technical preview behind a feature flag. The new picker lets you type
time ranges directly into a text input using flexible formats — combine
relative and absolute dates like `8 weeks ago to Apr 7, 2026`, use plain
expressions like `last 20 minutes`, or use the new shorthand syntax like
`-6mo` for the last 6 months. It supports the same quick presets,
absolute dates, recently used ranges, and auto-refresh as before.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Weronika Olejniczak <weronika.olejniczak@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
acstll added a commit that referenced this pull request Apr 23, 2026
…ck to true (#264743)

## Summary

This makes the new time picker the default in Discover and Dashboards.

It flips the fallback of the `unifiedSearch.newDateRangePickerEnabled`
feature flag to `true`, so the new `DateRangePicker` becomes the default
when the flag isn't explicitly configured.

See #260163 

To opt back into the legacy `EuiSuperDatePicker` locally, you can
override the flag in `config/kibana.dev.yml`:

```yaml
feature_flags.overrides:
  unifiedSearch.newDateRangePickerEnabled: false
```

## Changes

Follow-up commits on this branch also fix FTR/snapshot fallout from the
flip:

- `_esql_view.ts` (stateful + serverless): replaced hard-coded
`superDatePickerToggleQuickMenuButton` checks with
`timePicker.timePickerExists()` (both picker paths). Specs already had
`// TODO`s for exactly this change.
- `dashboard_controls` light/dark snapshots: regenerated baselines to
reflect the new picker's duration badge on dashboards.
- `ccs_compatibility/_cancel_results.ts` (ES|QL subtest): made the query
submit explicit so it no longer depends on the legacy picker's internal
`querySubmitButton` click.

> [!NOTE]
> Two Flaky Test Runner passes on the affected CCS config are linked in
the comments below.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Users who have not explicitly set the flag will now see the new
DateRangePicker in place of the legacy `EuiSuperDatePicker`. This is the
entire point of the flag — a staged rollout — so the risk is limited to
UX differences between the two pickers (e.g. the new picker's duration
badge, which required snapshot baseline updates here).

- [ ] ~~[See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)~~

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
smith pushed a commit to smith/kibana that referenced this pull request Apr 23, 2026
…ck to true (elastic#264743)

## Summary

This makes the new time picker the default in Discover and Dashboards.

It flips the fallback of the `unifiedSearch.newDateRangePickerEnabled`
feature flag to `true`, so the new `DateRangePicker` becomes the default
when the flag isn't explicitly configured.

See elastic#260163 

To opt back into the legacy `EuiSuperDatePicker` locally, you can
override the flag in `config/kibana.dev.yml`:

```yaml
feature_flags.overrides:
  unifiedSearch.newDateRangePickerEnabled: false
```

## Changes

Follow-up commits on this branch also fix FTR/snapshot fallout from the
flip:

- `_esql_view.ts` (stateful + serverless): replaced hard-coded
`superDatePickerToggleQuickMenuButton` checks with
`timePicker.timePickerExists()` (both picker paths). Specs already had
`// TODO`s for exactly this change.
- `dashboard_controls` light/dark snapshots: regenerated baselines to
reflect the new picker's duration badge on dashboards.
- `ccs_compatibility/_cancel_results.ts` (ES|QL subtest): made the query
submit explicit so it no longer depends on the legacy picker's internal
`querySubmitButton` click.

> [!NOTE]
> Two Flaky Test Runner passes on the affected CCS config are linked in
the comments below.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Users who have not explicitly set the flag will now see the new
DateRangePicker in place of the legacy `EuiSuperDatePicker`. This is the
entire point of the flag — a staged rollout — so the risk is limited to
UX differences between the two pickers (e.g. the new picker's duration
badge, which required snapshot baseline updates here).

- [ ] ~~[See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)~~

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rbrtj pushed a commit to walterra/kibana that referenced this pull request Apr 27, 2026
…ck to true (elastic#264743)

## Summary

This makes the new time picker the default in Discover and Dashboards.

It flips the fallback of the `unifiedSearch.newDateRangePickerEnabled`
feature flag to `true`, so the new `DateRangePicker` becomes the default
when the flag isn't explicitly configured.

See elastic#260163 

To opt back into the legacy `EuiSuperDatePicker` locally, you can
override the flag in `config/kibana.dev.yml`:

```yaml
feature_flags.overrides:
  unifiedSearch.newDateRangePickerEnabled: false
```

## Changes

Follow-up commits on this branch also fix FTR/snapshot fallout from the
flip:

- `_esql_view.ts` (stateful + serverless): replaced hard-coded
`superDatePickerToggleQuickMenuButton` checks with
`timePicker.timePickerExists()` (both picker paths). Specs already had
`// TODO`s for exactly this change.
- `dashboard_controls` light/dark snapshots: regenerated baselines to
reflect the new picker's duration badge on dashboards.
- `ccs_compatibility/_cancel_results.ts` (ES|QL subtest): made the query
submit explicit so it no longer depends on the legacy picker's internal
`querySubmitButton` click.

> [!NOTE]
> Two Flaky Test Runner passes on the affected CCS config are linked in
the comments below.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Users who have not explicitly set the flag will now see the new
DateRangePicker in place of the legacy `EuiSuperDatePicker`. This is the
entire point of the flag — a staged rollout — so the risk is limited to
UX differences between the two pickers (e.g. the new picker's duration
badge, which required snapshot baseline updates here).

- [ ] ~~[See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)~~

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SoniaSanzV pushed a commit to SoniaSanzV/kibana that referenced this pull request Apr 27, 2026
…ck to true (elastic#264743)

## Summary

This makes the new time picker the default in Discover and Dashboards.

It flips the fallback of the `unifiedSearch.newDateRangePickerEnabled`
feature flag to `true`, so the new `DateRangePicker` becomes the default
when the flag isn't explicitly configured.

See elastic#260163 

To opt back into the legacy `EuiSuperDatePicker` locally, you can
override the flag in `config/kibana.dev.yml`:

```yaml
feature_flags.overrides:
  unifiedSearch.newDateRangePickerEnabled: false
```

## Changes

Follow-up commits on this branch also fix FTR/snapshot fallout from the
flip:

- `_esql_view.ts` (stateful + serverless): replaced hard-coded
`superDatePickerToggleQuickMenuButton` checks with
`timePicker.timePickerExists()` (both picker paths). Specs already had
`// TODO`s for exactly this change.
- `dashboard_controls` light/dark snapshots: regenerated baselines to
reflect the new picker's duration badge on dashboards.
- `ccs_compatibility/_cancel_results.ts` (ES|QL subtest): made the query
submit explicit so it no longer depends on the legacy picker's internal
`querySubmitButton` click.

> [!NOTE]
> Two Flaky Test Runner passes on the affected CCS config are linked in
the comments below.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Users who have not explicitly set the flag will now see the new
DateRangePicker in place of the legacy `EuiSuperDatePicker`. This is the
entire point of the flag — a staged rollout — so the risk is limited to
UX differences between the two pickers (e.g. the new picker's duration
badge, which required snapshot baseline updates here).

- [ ] ~~[See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)~~

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
acstll added a commit to acstll/kibana that referenced this pull request May 7, 2026
isNewDateRangePicker swallowed a 5s waitFor timeout into `false`, so
the legacy branch ran while the new picker was still mounting and
failed ~10s later with a misleading "superDatePickerToggleQuickMenuButton
not visible" error. This caused all 41 streams_app failures + the APM
Scout failures observed in build #438857.

Replace the detection with the pattern from elastic#260163: a single CSS-OR
locator + .first() + 10s waitFor, then read data-test-subj to pick the
variant. Throws fast if neither picker is on the page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:cloud-deploy Create or update a Cloud deployment Feature:Unified search Unified search related tasks release_note:enhancement v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.