<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <script type="text/javascript"> function CheckToday(sender, e) { var format = sender._todaysDateFormat; var date = new Date(); var formateddate = date.format(format); var daycells = $get(sender.get_id() + "_body").getElementsByTagName("DIV"); for (var i = 0; i < daycells.length; i++) { if (daycells[i].title.indexOf(formateddate) > -1) { daycells[i].style.backgroundColor = "Green"; daycells[i].style.color = "White"; break; } } } </script> <asp:TextBox ID="TextBox_date" runat="server"></asp:TextBox> <asp:CalendarExtender ID="CalendarExtender1" TargetControlID="TextBox_date" OnClientShown="CheckToday" runat="server"> </asp:CalendarExtender>
Wednesday, December 14, 2011
Highlighting Current Date in AjaxControlToolkit.CalendarExtender
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment