Calendar + classic Combobox (not dhtmlx) + IE6

Hello.

Have you try to open your calendar in IE6 and with html behind DHTMLXCalendar. If you want to try it, go to your presentation (dhtmlx.com/docs/products/dht … ndex.shtml) and execute this JavaScript code :

document.getElementsByTagName("p")[1].innerHTML="<select  style='width:300px;'><option value='sorry'>And now, open your calendar</option></select>"

Now, you can try to open your calendar :slight_smile:

If you doesn’t know this bug, it’s because is draws by IE6 as it draws Iframes. To resolve it you must just draw an iframe behind the div of calendar, iframe who have same dimensions of div.

Delphin.

I have rectify this bug, and I gave it to you the correction :

if (vIE() == 6) { //useless for others navigators
	// We use your calendar as singleton, and variable's name is "calendrier".
	
	(function () {
		//To initilize iframe. To do just after initialize calendrier.base
		calendrier.iframeCorrection = document.createElement("iframe");
		calendrier.iframeCorrection.style.cssText="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);";
		calendrier.iframeCorrection.style.display="none";
		calendrier.iframeCorrection.style.position="absolute";
		calendrier.iframeCorrection.style.left="0px";
		calendrier.iframeCorrection.style.top="0px";
		calendrier.base.appendChild(calendrier.iframeCorrection);
		
		//Code to correct method "_show" -> show iframe and give dimensions of div "base".
		//It's the solution with library "prototype" (with methods getWidth() and getHeight()) but it's the cleverness
		var show = calendrier._show;
		calendrier._show = function () {
			show.apply(this, arguments);
			calendrier.iframeCorrection.style.display="";
			calendrier.iframeCorrection.style.width=$(calendrier.base).getWidth()+"px";
			calendrier.iframeCorrection.style.height=$(calendrier.base).getHeight()+"px";
		}
		
		//And to finish, hide iframe with calendar hide.
		var hide = calendrier._hide;
		calendrier._hide = function () {
			hide.aplpy(this, arguments);
			calendrier.iframeCorrection.style.display="none";
		}
	})();
}

Delphin.

Hello Delphin,

thank you for the provided solution. It is correct.

We have added iframe support to Calendar. The latest libraries are attached here:

viewtopic.php?f=7&t=20171#p64124

To show an iframe you need to call enableIframe method:

calendar.enableIframe(true);