Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to close CalendarExtender on lost focus or mouse out
WhatsApp
Suthish Nair
6y
28
k
0
2
25
Blog
<
script
language
=
"javascript"
type
=
"text/javascript"
>
var
blnflag
=
false
;
document.onmouseout
=
function
(sender, args)
{
if (event.srcElement.tagName.toLowerCase() == "div" && event.srcElement.outerHTML.indexOf("ajax__calendar")
>
0)
blnflag
=
true
;
if (blnflag && event.srcElement.tagName.toLowerCase() != "div")
{
blnflag
=
false
;
$find("CEBID1").hide();
}
}
</
script
>
<
asp:TextBox
id
=
"txtFrom"
onkeypress
=
"return false;"
onkeydown
=
"return false;"
onmouseover
=
"return false;"
runat
=
"server"
style
=
"width: 100px"
/>
<
img
id
=
"img1"
runat
=
"server"
alt
=
"Date"
src
=
"images/cal.gif"
temp_src
=
"images/cal.gif"
/>
<
cc1:CalendarExtender
BehaviorID
=
"CEBID1"
runat
=
"server"
ID
=
"cl1"
TargetControlID
=
"txtFrom"
PopupButtonID
=
"img1"
Format
=
"dd-MMM-yyyy"
>
</
cc1:CalendarExtender
>
Ajax
CalendarExtender
People also reading
Membership not found