DatePicker inside ContextMenu closing the popup when use the picker



I used ContextMenu with button target for what use to be PopupView in the past (V8)

click outside the popup made it close make sense, but currently selection or press on Today/Cancel is closing the popup and it is annoying.

While use some other components was no issue with that, I guess something related for picker having extra popup, make its close event to close the ContextMenu too.

Any idea how to overcome this issue?


		Button popupButton = Button("pop");
		VerticalLayout layout = new VerticalLayout();
		layout.add(new DatePicker("date picker"));
		ContextMenu popup = new ContextMenu(popupButton);

It looks like a bug (could you check and, if not reported, [open a new issue]
( please?). As a an alternative, have you considered something like:

DatePicker datePicker = new DatePicker("date picker");
Button popupButton = new Button("pop", event ->
        new Dialog(datePicker).open());



indeed look like a bug. is there an easy hook to handle the events?

Dialog can fit if it has an easy API to open it with relevant place to the target component (or any other component)

Thank you!

Is there any news on this? I faced the same bug today

Thanks in advance


a workaround here: