How to disable the Previous dates in AjaxCalendar Control...Its very urgent

Last post 05-16-2008 12:00 AM by Zhi-Qiang Ni - MSFT. 1 replies.

Sort Posts:

  • How to disable the Previous dates in AjaxCalendar Control...Its very urgent

    05-09-2008, 12:18 PM
    • Loading...
    • UdayaMohan
    • Joined on 05-09-2008, 4:09 PM
    • Posts 3

    Hi All,

    My application is Hotel booking, i need to disable the previous dates.How to disable the Previous dates in AjaxCalendar control.

    i am unable the find the events in AjaxCalendar Extendar control. Please help me..

    thanks in Advance.

    UdayaMohanSad 

     

     

     

  • Re: How to disable the Previous dates in AjaxCalendar Control...Its very urgent

    05-16-2008, 12:00 AM

    Hi UdayaMohan,

    UdayaMohan:
    How to disable the Previous dates in AjaxCalendar control.

    To achieve your goal, please refer to this code: 

       <script type="text/javascript" language="javascript">
            var cal;
            function pageLoad() {
                cal = $find("<%=TextBox1_CalendarExtender.ClientID%>");
                cal.add_hidden(checkValue);          
            }       
            
            function checkValue(){
                if (cal._selectedDate < new Date()) 
                {
                    alert("Please select a future day!");
                    cal.show();
                }
            }
        </script>
    I hope all above can help you, any other questions, please let me know, thanks.

    Based regards,

    Zhi-Qiang Ni

    Please remember to click “Mark as Answer” on the post that helps you , and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (2 items)