Programmatically close PopupDateField popup with Vaadin 7

Hi all,

I am struggling to find a way to programmatically close the calendar popup that gets displayed with the PopupDateField component. Am I missing something simple and what would be the best way to accomplish this?

Thanks in advanced

You are correct. There is no API for this yet. I checked that we do not have request for such API in our issue tracker either, there is request for adding API for programmatic opening of the popup, but that has not got much traction.

https://github.com/vaadin/framework/issues/7670

There are public methods openCalendarPanel() and closeCalendarPanel() in the VPopupCalendar Widget that is used by the component in the client side. It should be rather straightforward excercise to write custom component extending PopupDateField that adds serverside API, which will do ClientRpc calls which inturn will invoke these methods.

Hi,

Have you tried setting focus on some other component?

-Olli

Thanks for the fast replies, I will try and implement these solution and get back to you