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] Allow setting absolute dates without Enter key #7731

Closed
sakurai-youhei opened this issue May 3, 2024 · 1 comment · Fixed by #7732
Closed

[EuiSuperDatePicker] Allow setting absolute dates without Enter key #7731

sakurai-youhei opened this issue May 3, 2024 · 1 comment · Fixed by #7732
Assignees

Comments

@sakurai-youhei
Copy link
Member

Issue:
When I set absolute dates using EuiSuperDatePicker, I place one hand on the pointing device and the other around the num keys on the keyboard.

image

This positioning used to work fine, but it's not comfortable anymore because the date parsing mandates hitting the Enter key nowadays, which requires an extra few inches of hand movement over the keyboard or hand off the pointing device.

Steps to set 01:05:00.000 to 01:05:15.000:

  1. Click start date.
  2. Click Absolute.
  3. Click 01:00.
  4. Select 0 to replace by mouse.
  5. Type in 5.
  6. Need to hit Enter.
  7. Select input text.
  8. Copy it by Ctrl+C.
  9. Click end date.
  10. Click Absolute.
  11. Select input text.
  12. Paste it by Ctl-V.
  13. Select 00 to replace.
  14. Type in 15.
  15. Need to hit Enter.
    EuiSuperDatePicker

Another pain point is that if I forget to hit Enter, my input text will be discarded when closing the absolute tab.

Solution
Trigger date parsing on blur from the input field. I will open a PR to address this issue shortly.

Alternative
Buy a keypad or keyboard with a keypad.

@cee-chen
Copy link
Member

cee-chen commented May 3, 2024

I would strongly prefer the input to support both Enter key and onBlur. I think that helps the maximum number of users possible.

FWIW we previously experimented with validating the timestamp on debounced keypress and determined that to not be a good UX (too dependent on user typing speed - see #7331 (comment)) so I would veto that UX option (not that it's been suggested in this thread, I just want to get ahead of it 😆)

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.

2 participants