Eui: [EuiDatePicker] Clicking time values, makes scrollbar jump if current time is late

Created on 26 Feb 2019  路  3Comments  路  Source: elastic/eui

When selecting a time value, the container scroll jumps. It makes it very difficult to see what was actually selected. Also notice the extra bug: the first time I clicked on a time value (08:00AM), nothing was selected, but it still jumped. Second time I clicked 08.30AM which worked, but still jumped. Third time I clicked 08.00AM which also worked and jumped.

image1

!urgent! bug

Most helpful comment

So this is actually "bug" in react-datepicker. I say "bug" in quotes because it is as they designed.

What is happening is that no matter what you click in the time selection, they keep :focus on the user's current time (shown by the slightly highlighted box around 11:30 PM in your example. Browsers always keep the focused items in the scroll view so that's why the scrolled area jumps.

The reason it's not noticeable on the normal datepickers is because the popover always closes after selecting the time.

I'm going to update the title of this one to be more date picker generalized. But I do think it's something we should probably fix in our fork of the react-datepicker.

cc @snide @chandlerprall ^^

All 3 comments

So this is actually "bug" in react-datepicker. I say "bug" in quotes because it is as they designed.

What is happening is that no matter what you click in the time selection, they keep :focus on the user's current time (shown by the slightly highlighted box around 11:30 PM in your example. Browsers always keep the focused items in the scroll view so that's why the scrolled area jumps.

The reason it's not noticeable on the normal datepickers is because the popover always closes after selecting the time.

I'm going to update the title of this one to be more date picker generalized. But I do think it's something we should probably fix in our fork of the react-datepicker.

cc @snide @chandlerprall ^^

@chandlerprall or @thompsongl Either of you think you could look into this one in the next couple days? Think we just need to tweak the way we do focus in these (I realize that may not be easy). We've had enough consistent complaints here it's something we might want to fix before RC1.

I'll take it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

roberto910907 picture roberto910907  路  3Comments

stacey-gammon picture stacey-gammon  路  4Comments

peteharverson picture peteharverson  路  3Comments

igoristic picture igoristic  路  4Comments

jen-huang picture jen-huang  路  4Comments