是否有一种简单的方法可以检测datepicker小部件中的第二天是否已禁用该类'?
我使用beforeShowDay:checkAvailability,日历,但延长了半预订日期。现在我想检查第二天是否已禁用,以便用户无法预订。
亲切的问候,
斯蒂芬
switch ($durationValue) {
case 'weekend':
for (var i = 0; i < $myBadDates.length; i++) {
if ($myBadDates[i] == $checkdate) {
if ($.inArray($myBadDates[i], $halfavailable) !== -1) {
$returnclass = "halfavailable";
} else {
$returnclass = "unavailable";
}
}
}
return [mydate.getDay() == 5, $returnclass];
break;
case 'midweek':
for (var i = 0; i < $myBadDates.length; i++) {
if ($myBadDates[i] == $checkdate) {
if ($.inArray($myBadDates[i], $halfavailable) !== -1) {
$returnclass = "halfavailable";
} else {
$returnclass = "unavailable";
}
}
}
return [mydate.getDay() == 1, $returnclass];
break;
case 'week':
for (var i = 0; i < $myBadDates.length; i++) {
if ($myBadDates[i] == $checkdate) {
if ($.inArray($myBadDates[i], $halfavailable) !== -1) {
$returnclass = "halfavailable";
} else {
$returnclass = "unavailable";
}
}
}
return [mydate.getDay() == 1, $returnclass];
break;
default: ''
}