How to toggle popup?

calendar, select … is hard to close

You can call hide method of the related component or just call the next line to close all popups, selects, contextmenus and etc.

webix.callEvent("onClick",[])

how to implement click to open, then click to close for datepicker?

Sorry, it is not clear which behavior do you need.

By default datepicker control shows calendar by click and hides calendar by any click outside of the control.

Sorry for delay reply, I want to implement that: input with icon, when click icon show popup, click icon again to hide popup, not only click outside of the control.

Check the following snippet. You can put a check for visibility in click handler and based on it show or hide the datepicker.

http://webix.com/snippet/bc160454

Thank you !

Is there a way to close “richselect” popup by clicking on parent field?
Tried to implement, but it does not look like I’m trying in a right direction.

http://webix.com/snippet/befe427c

Hello,

You should set “click” property in “defaults”. And here is how you can hide a popup after clicking richselect:

http://webix.com/snippet/4788a7a3

Perfect. Thanks.

Another question, how to open popup only when click on icon?

It possible to intercept click on text part of input and block the reaction

http://webix.com/snippet/69b5bf73

Thanks :slight_smile: