disable date

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
sandy1028
Forum Commoner
Posts: 60
Joined: Thu Jul 26, 2007 3:56 am

disable date

Post 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));
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Post Reply