Hi all, hoping someone can help me with this one...
Hugh, the jedi master wrote this script for me a while ago to dissallow dates in the calendar....
which works very well but I would like to change the date_array so it queries a list.
list will have 2 elements date and description, so i want it just to check if the date exists in the list and block that date...
Thanks in advance.
Hugh, the jedi master wrote this script for me a while ago to dissallow dates in the calendar....
Code:
function disallowDate(cal, date) {
var today = new Date;
var three_days = 1000 * 60 * 60 * 24 * 1;
dayDiff = date.getTime() - today.getTime();
if (dayDiff < three_days) {
return true;
}
date_array = ['31-03-2012', '01-04-2012'];
for (i=0; i < date_array.length; i++) {
if (date_array[i] == date.format('%d-%m-%Y')) {
return true;
}
}
return false;
}
which works very well but I would like to change the date_array so it queries a list.
list will have 2 elements date and description, so i want it just to check if the date exists in the list and block that date...
Thanks in advance.