DHTMLX Calendar : Closing Calendar if date not selected

Hi there,

I am using DHTMLX Calendar, I want the functionality that if I don’t select the date when click on some input then the calendar object should automatically be closed. I used following on PARENT JSP page, but not working. Please help.





dhtmlxEvent(document.body,“click”,function(){

                                    .close();

                                    });

Please try to use
dhtmlxEvent(document.body,“click”,function(){

                                    .hide();

                                    });

Its not working as I am loading Calendar on CLICK of an icon.
How to solve this ?

<img onclick=" calendar.show(); (arguments[0]||event).cancelBubble=true; " …

by adding code marked in bold you will prevent event bubbling so, click event will not triger calendar closing.

Will this work with JSP which is shown using modalbox ??? As I am able
to show the calendar on it, but date is not getting selected.

The component is fully client side so it will work the same with any server side code.