DatePicker inside ContextMenu closing the popup when use the picker

B"H

Hi

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?

Thanks!

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

It looks like a bug (could you check and, if not reported, [open a new issue]
(https://github.com/vaadin/vaadin-date-picker-flow/issues) 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());
add(popupButton);

B"H

Sure

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

B"H

a workaround here: https://github.com/vaadin/vaadin-date-picker-flow/issues/250