This function will blackout all instances of the given day and prevent the user from selecting them. You can insert it at the end of the
createCalCells() method.
- Code: Select all
/**
* Blackout all instances of bkday (0:monday to 6:sunday)
* @param int bkday
*/
function blackoutDay(bkday) {
var noDates = new Array();
var idx = 0;
for(var i=0;i< self.cells.length;i++) {
if(self.cells[i].date.getDay() == bkday) {
noDates[idx] = new Date(cells[i].date);
noDates[idx].canSelect = false;
idx++;
}
}
self.addDates(noDates);
}