Skip to content

[React 19][EuiDatepicker] Errors out in React 19 #9009

Closed

Description

@JasonStoltz

Describe the bug
Here’s a battle anecdote about using EUI + Vite + React 19 (unsupported).

EuiDatepicker is one of the components that won’t work with React 19 (regardless of strict mode). It renders, but when you click on it and try to choose a month or a year in the calendar, it crashes with the following error:

With React 19, using the date picker gives me two errors:

Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.

Uncaught Error: Expected ref to be a function, an object returned by React.createRef(), or undefined/null.

Whereas with React 18, it works but is rather menacing:

Warning: Component "Fragment" contains the string ref "January". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref Error Component Stack


**Impact and severity**
Severe if you're using React 19.

At the time, the reporter was using this for a side project, not an Elastic product, so not necessarily urgent.

**Environment and versions**
- EUI version: 106.5
- React version: 19

**Minimum reproducible sandbox**

N/A

**To Reproduce**

N/A

**Expected behavior**
N/A

**Screenshots (Optional)**
N/A

**Additional context (Optional)**
Reported by @cleydyr 

Activity

  1. added
    ⚠️ needs validation
    on Sep 12, 2025
  2. added theissue type on Sep 12, 2025
  3. removed
    ⚠️ needs validation
    on Sep 12, 2025
  4. JasonStoltz commented on Sep 12, 2025

    @JasonStoltz
    ContributorAuthor

    Per @tkajtoch:

    The issue with this case is bigger since our EuiDatePicker is based on an old, forked version of react-datepicker. It'll take time to get it updated and stable again

  5. github-actions commented on Mar 11, 2026

    @github-actions

    👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

  6. added
    stale-issue
    on Mar 11, 2026
  7. weronikaolejniczak commented on Mar 16, 2026

    @weronikaolejniczak
    Contributor

    @JasonStoltz do you agree we should likely close this one in favor of the new date picker?

  8. removed
    stale-issue
    on Mar 17, 2026
  9. JasonStoltz commented on Jun 17, 2026

    @JasonStoltz
    ContributorAuthor

    I'm going to close this request, since the DateRangePicker component will replace the SuperDatePicker.

  10. added a commit that references this issue on Aug 27, 2026
    24fee02
  11. added
    help wanted
    on Aug 27, 2026
  12. github-actions commented on Aug 27, 2026

    @github-actions

    👋 Thank you for your suggestion or request! While the EUI team agrees that it's valid, it's unlikely that we will prioritize this issue on our roadmap. We'll leave the issue open if you or anyone else in the community wants to implement it by contributing to EUI. If not, this issue will auto close in one year.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions