Page 1 of 1

disable date

Posted: Fri Oct 12, 2007 5:00 am
by sandy1028
Hi,

cal.addDisabledDates(year+"-"+month+"-"+day);
disables the current date.
How to disable all the future dates from current date for a particular month

Code: Select all

<SCRIPT LANGUAGE="JavaScript">
        var cal = new CalendarPopup();
        var currentTime = new Date();
        var month = currentTime.getMonth() + 1;
        var day = currentTime.getDate();
        var year = currentTime.getFullYear();
     cal.addDisabledDates(year+"-"+month+"-"+day);
     cal.addDisabledDates(year+"-"+month+"-"+(day-1));

Posted: Fri Oct 12, 2007 9:37 am
by feyd
There is no built-in type called CalendarPopUp. Please clarify where it comes from otherwise I can only recommend looking at their documentation.

Posted: Sat Oct 13, 2007 2:40 am
by Kieran Huggins