Anybody got any clue why this won't work with more than 1 date...
it only takes the first date in the array...
var unavailableDates = ["10-6-2011","13-6-2011"];
function unavailable(date) {
dmy = date.getDate() + "-" + (date.getMonth() + 1) + "-" + date.getFullYear();
if ($.inArray(dmy, unavailableDates) == 0) {
return [false, "", "Unavailable"];
} else {
var day = date.getDay();
return [(day != 0 && day != 2 && day != 3 && day != 4 && day != 6)];
}
}
see full example below
http://offline.raileisure.com/lee.php
Thanks in advance
Lee