Thursday, December 23, 2010

How to disable the ajax calender dates which are less than the current day?

 Hi All,
            I got so much help form the link bellow to solve some of issue which i need to implement on one of my project. That's why i thought to share with you so can you also get some help from here...

Disable the dates which are less than the current day

1 comment:

  1. 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))

    var theDay=sender._selectedDate.getDay();
    //alert(theDay);

    if (theDay == 0) {
    sender._selectedDate = new Date();
    alert("You have selected sunday!");
    document.getElementById('txtEndDate').value ="";

    }
    }
    }

    ReplyDelete