That's a tough one. I'm not really sure if that's even possible to wire your own client side events to the various clicks of the calendar, as that control (and its creation/rendering) is completely abstracted into the calendar control (as opposed to something like a datagrid or others).
However, an alternative may be to go ahead and handle the click event as you normally would, and in that event in your code-behind, write out some client side script to the browser that would display this alert. Yea, the page is going to flicker (post back), but I don't see how else you could accomplish this...
1. Create a Panel object which has the Javascript to popup the window.
2. Set the panel's Visible property to false.
3. Set the calendar's OnSelectionChanged property to a public/protected method of the Page.
4. In that method, set the panel's Visible property to true - this will force the Javascript to execute when the page loads. In order to pass parameters, you may need to create a TextBox and store the date as a temporary value. Do not set the TextBox's Visible property to false because it will not be on the form. You will have to create a <div style="display:none;"> block to place teh TextBox into - or something similar.
Hope this works. This was sort of the same work-around I had to use. The only other alternative that I saw was creating a new calendar control that inherits the .NET one. ________________________________________
Michael C Flanakin
Indigo Web Systems
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.