Wednesday, February 1, 2012

Date Validation for Ajaxcalendar extendar control in

 <script language="javascript" type="text/javascript">
        function CheckEndDate(sender, args) {
            date1 = new Date()
            date1.setHours(0, 0, 0, 0);
            if (sender._selectedDate < date1) {
                alert("Expiry Date should not be less than current date! ");
                sender._selectedDate = new Date();
                // set the date back to the today
            else {


 <asp:TextBox ID="txtStartDate" runat="server"> </asp:TextBox>
                                            <asp:ImageButton ID="CalendarImage1" runat="server" Height="18px" ImageAlign="AbsMiddle" ImageUrl="~/App_Themes/Default/images/Calendar_view_month.png" />
                                            <cc1:CalendarExtender ID="CalendarExtender1" runat="server" Enabled="True" FirstDayOfWeek="Sunday" Format="dd/MM/yyyy" PopupButtonID="CalendarImage1" TargetControlID="txtStartDate">

No comments:

Post a Comment



Custom Search
Protected by Copyscape Plagiarism Software