User61956409 posted
Hi Francis SZE,
finding a way to hide ASP:calendar in case of mouseout ASP:TEXTBOX
visible ASP:calendar in case of mouseover ASP:TEXTBOX
You can refer to the following code snippets to hide asp:Calendar control.
From :<asp:TextBox runat="server" ID="LastUpdateDateTimeFrom" Format="yyyy-MM-dd" AutoPostBack="True" OnTextChanged="LastUpdateDateTimeFrom_TextChanged" onmouseout="myfunc()" /><br />
<script>
function myfunc() {
var fromdate = document.getElementById('<%=LastUpdateDateTimeFrom.ClientID%>').value;
//your code logic here
if (fromdate != "") {
document.getElementById('<%=LastUpdateDateTimeLastUpdateDateTimeFromCal.ClientID%>').style.visibility = "hidden";
}
}
</script>
Test Result:

Note:
When the loses focus from asp:TextBox "LastUpdateDateTimeFrom", which will cause page postback, and the asp:Calendar control would be displayed again. If possible, you can hide the asp:Calendar control within LastUpdateDateTimeFrom_TextChanged
event.
With Regards,
Fei Han