I’ve added textField.setAutoselect(true) to my app, and that works just fine.
This method is on TextFieldBase, so DatePicker is excluded, which is annoying.

textField.setAutoselect does:

getElement().setProperty(“autoselect”, autoselect);

That works on DatePicker as well…

Looks like DatePicker should’ve inherited from TextFieldBase

You can file a feature request. Maybe there is already one Issues · vaadin/flow-components · GitHub

1 Like

Didn’t you create an issue for that already? ;) If it annoys you, the change looks pretty simple - so creating a PR is probably doable

2022… I had forgotten about that :slight_smile:

When that is said, I have noticed that Vaadin have been picking up older issues lately, so maybe there’s hope.

1 Like

No need to wait, Viritin 2.8.5 (currently syncing to central) contains something better than this “autoselect thingie”, full Selection API, now also for VDatePicker, coming your way :sunglasses:

1 Like