Calendar Control Not Working in IE9 – Classic ASP
Calendar Control Not Working in IE9 - Classic ASP
Apr 23, 2014 02:50 PM
Hello, I am using the below code for calendar control which returns the selected date to a text field. This was working just fine for browsers below IE 8 but not IE 9. Can someone please provide some insight to fix this calendar control to be working in
IE 9 or 10
<head>
<title>SELECT A DATE</title>
<!--<meta http-equiv="X-UA-Compatible" content="IE=8" />-->
<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
<META HTTP-EQUIV="expires" CONTENT="0">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
</head>
<BODY bottomMargin=0 leftMargin=0 topMargin=0 rightMargin=0 bgcolor=#cccac0>
<SCRIPT LANGUAGE=VBSCRIPT>
Sub window_onunload
window.returnvalue = formatdatetime(document.all.Calendar1.value,2)
end sub
</SCRIPT>
<!--<SCRIPT LANGUAGE=VBSCRIPT>
Sub window_onunload
window.returnvalue = formatdatetime(document.getElementById("Calendar1"))
end sub
</SCRIPT>-->
<OBJECT id="Calendar1" style="LEFT: 0px; WIDTH: 289px; TOP: 0px; HEIGHT: 198px"
classid="clsid:8E27C92B-1264-101C-8A2F-040224009C02" width=289 height=198 VIEWASTEXT class="Calendar">
<PARAM NAME="_Version" VALUE="524288">
<PARAM NAME="_ExtentX" VALUE="7646">
<PARAM NAME="_ExtentY" VALUE="5239">
<PARAM NAME="_StockProps" VALUE="1">
<PARAM NAME="BackColor" VALUE="-2147483633">
<PARAM NAME="Year" VALUE="<%=year(now())%>">
<PARAM NAME="Month" VALUE="<%=month(now())%>">
<PARAM NAME="Day" VALUE="<%=day(now())%>">
<PARAM NAME="DayLength" VALUE="1">
<PARAM NAME="MonthLength" VALUE="2">
<PARAM NAME="DayFontColor" VALUE="0">
<PARAM NAME="FirstDay" VALUE="1">
<PARAM NAME="GridCellEffect" VALUE="1">
<PARAM NAME="GridFontColor" VALUE="10485760">
<PARAM NAME="GridLinesColor" VALUE="-2147483632">
<PARAM NAME="ShowDateSelectors" VALUE="-1">
<PARAM NAME="ShowDays" VALUE="-1">
<PARAM NAME="ShowHorizontalGrid" VALUE="-1">
<PARAM NAME="ShowTitle" VALUE="-1">
<PARAM NAME="ShowVerticalGrid" VALUE="-1">
<PARAM NAME="TitleFontColor" VALUE="10485760">
<PARAM NAME="ValueIsNull" VALUE="0">
</OBJECT>
<BR>
<center><!-- <INPUT type=button value="Select Date" onClick=window.close></center> -->
<img src="selectadate.png" alt="Select a Date" onClick=window.close>
</BODY>
Thanks in Advance
~J