如何将 5 月禁用日期的背景颜色更改为红色?
<input id="iDate">
<script type='text/javascript'>
var unavailableDates = ["9-5-2013", "14-5-2013", "15-5-2013"];
function unavailable(date) {
dmy = date.getDate() + "-" + (date.getMonth() + 1) + "-" + date.getFullYear();
if ($.inArray(dmy, unavailableDates) == -1) {
return [true, ""];
} else {
return [false, "", "Unavailable"];
}
}
$(function() {
$("#iDate").datepicker({
dateFormat: 'dd MM yy',
beforeShowDay: unavailable
});
});
</script>