Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Custom component like DateField
Hello,
I’m trying to implement a custom component which looks like a DateField. I’m extending CustomComponent and it contains a TextField and a PopupButton. I have managed to create style which creates one border around textfield and button, but the problem is now focused border: How to create style when user clicks the textfield, then the focused border is around field and button and when user clicks the popupbutton then focused border is again around both components?
Regards,
Tapio
Make up separate stylenames for those states and toggle them in click-/focus-/blurlisteners? Just remember that you need to remove them when clicked somewhere completely outside.