Struggling with an ASP.NET Calendar which closes when I press the "previous/next month".
I will allow it to be closed, but closed only when a select date.
HTML Code:
<script type="text/javascript">
var timeout = 300;
was close hours = 0;
var dropdown = 0;
mopen function (id)
{
mcancelclosetime ();
if (drop down) dropdown.style.visibility = 'hidden';
dropdown = document.getElementById (id);
dropdown.style.visibility = 'visible';
}
function mclose ()
{
if (drop down) dropdown.style.visibility = 'hidden';
}
function mclosetime ()
{
close hours = window.setTimeout (mclose, timeout);
}
function mcancelclosetime ()
{
if (close hours)
{
window.clearTimeout (close hours);
close hours = null;
}
}
document.onclick = mclose;
</script>
HTML Code:
<div id="drop">
<p href="#" onmouseover="mopen('1')" onmouseout="mclosetime()"> Choose date </p>
<div id="1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
<asp:Calendar ID="Calendar1" runat="server" BackColor="Red"> </asp:Calendar>
</div>
</div>
Bookmarks