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

DateRangePicker - onBlur not invoked after exiting field #3582

Closed
jarlef opened this issue Aug 12, 2024 · 3 comments · Fixed by #3584
Closed

DateRangePicker - onBlur not invoked after exiting field #3582

jarlef opened this issue Aug 12, 2024 · 3 comments · Fixed by #3584
Assignees
Labels
🐛 bug Something isn't working

Comments

@jarlef
Copy link

jarlef commented Aug 12, 2024

The onBlur callback is never triggered by the DateRangerPicker component when the user leaves the input. The onBlur event is essential to know when the user is done editing the field so the frontend can persist the change ad-hoc since the onChange is triggered for almost every keystroke the user does

 <DateRangePicker
              value={myRange}
              onChange={range => setMyRange(range)}
              onBlur={() => console.log('this will never be invoked')}
            />
@jarlef jarlef added the 🐛 bug Something isn't working label Aug 12, 2024
@oddvernes
Copy link
Collaborator

I see that the "rest" {...props} is not applied in the DaterangePicker as it is in the DatePicker. Putting it in seems to fix the issue. Note that onBlur is also triggered by opening the calendar popover since that then blurs the input as well.

@jarlef
Copy link
Author

jarlef commented Aug 14, 2024

What is the timeline for when a new eds version is deployed?

@oddvernes
Copy link
Collaborator

I can probably make a release later today. I was hoping to get #3571 in but I think maybe they've gone on vacation 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants