Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do i disable calender date before todays date in ajax calender extender using javascript?
Posted

Make sure you add the following js and css files.

* jquery-1.4.1.min.js
* jquery.ui.core.js
* jquery.ui.datepicker.js
* jquery-ui-1.8.8.custom.css

Now paste the following code:
XML
<script type="text/javascript">
    $(function () {
        var date = new Date();
        var currentMonth = date.getMonth(); // current month
        var currentDate = date.getDate(); // current date
        var currentYear = date.getFullYear(); //this year
        $("#<%= tbxRequestDeliveryDate.ClientID %>").datepicker({
            changeMonth: true, // this will allow users to chnage the month
            changeYear: true, // this will allow users to chnage the year
            minDate: new Date(currentYear, currentMonth, currentDate)
           
        });
    });
</script>


C#
<asp:textbox id="tbxRequestDeliveryDate" runat="server" cssclass="text" xmlns:asp="#unknown">


For more detail click here
 
Share this answer
 
v2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900