disable date
Posted: Fri Oct 12, 2007 5:00 am
Hi,
cal.addDisabledDates(year+"-"+month+"-"+day);
disables the current date.
How to disable all the future dates from current date for a particular month
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));