Categories | Question details Back To List | ||||||||||||||
how to get calendar closed on clicking on calendar icon the second time Hi, I am using a text box with an image icon.when it is clicked the first time the calendar is loaded properly.but it will not close when we click on it a second time.It closes on clicking anywhere outside the second time.But I want to do this,on clicking the icon a second time.pls help.Thanks in advance. I am using the following function window.onload=function(){ mCal = new dhtmlxCalendarObject('calInput1'); dhtmlxEvent(document.body,"click",function(){ mCal.hide(); }) dhtmlxEvent(document.getElementById("calinput1"),"click",function(e){ (e||event).cancelBubble=true; }) } Answer posted by Support on Jun 08, 2009 05:24 Issue can't be reconstructed locally - attached sample uses the same code and works correctly. Attachments (1)
Answer posted on Jun 09, 2009 02:41 dhtmlxEvent(document.body,"click",function(){ mCal.hide(); }) dhtmlxEvent(document.getElementById("calinput1"),"click",function(e){ (e||event).cancelBubble=true; }) When I give these two lines of code , calendar is not loaded in firefox2 but is loaded in IE6.When I remove these 2 lines of code it works in firefox as well as IE,but i am not able to close the calendar. Also in Firefox it is not loaded next to the text box.Can you tell me how to fix the position of calendar loaded. Answer posted by Alex (support) on Jun 09, 2009 06:35 Hello, if you want to control calendar position, it is better to not use input initialization. Method setPosition(y,x) allows to define the necessary calendar position. Please, see attached sample
Attachments (1)
|