<script> function checkDate(sender,args) { if (sender._selectedDate < new Date()) { alert("You cannot select a day earlier than today!"); sender._selectedDate = new Date(); // set the date back to the current date sender._textbox.set_Value(sender._selectedDate.format(sender._format)) } } </script> <asp:TextBox ID="txtbox" runat="server" Enabled="false" Font-Names="Calibri" Font-Size="Medium" Height="20px" TabIndex="20" Width="175px" MaxLength="11"> <asp:CalendarExtender ID="CalendarExtender2" runat="server" Format="dd/MMM/yyyy" TargetControlID="txtbox" OnClientDateSelectionChanged="checkDate" />
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)