<%@ Page Language="C#" %> <html> <head id="Head1" runat="server"> <script runat="server"> protected void DisablePastDays(object sender, DayRenderEventArgs e) { if (e.Day.Date < DateTime.Now) { e.Cell.Enabled = false; e.Day.IsSelectable = false; e.Cell.BackColor = System.Drawing.Color.Gray; } } </script> </head> <body> <form id="form1" runat="server"> <asp:Calendar runat="server" ID="calDate" OnDayRender="DisablePastDays" /> </form> </body> </html>
Tuesday, November 02, 2010
How to disable past days in asp.net calender control
Subscribe to:
Post Comments (Atom)
Azure Storage Account Types
Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...
-
Demo: I was thinking a way to show images before actually uploading them to server. I would say to preview images using javascript. Obv...
-
Demo : I am using asp.net UpdatePanel control to partial page update. As there is no keyup event for the asp.net TextBox control, I add an ...
No comments:
Post a Comment