maybe it would help if i explained what im trying to do. i have this function which is a callback for a js date picker. it returns true if the date should be disabled, and false if the date should not be disabled. currently blocks past dates, and dates a certain distance in the future defined by MAX_ADV_TIME.
function dateStatus(date) {
var min = new Date('<?php echo date('m/d/Y'); ?>');
var max = new Date('<?php echo date('m/d/Y', time() + MAX_ADV_TIME); ?>');
if(date.getTime() < min.getTime() || date.getTime() > max.getTime()){
return true; // true says "disable"
}else{
return false; // leave other dates enabled
}
};
i want to be able to pass an array of dates that should be disabled in the date picker. i want to pass the array from php to js (should i use json? and if so how?).
any help would be great! thanks!!