ibeautiful
稍加修改后,无论您设置了哪种dateFormat,它都可以工作。$("#datepicker").datepicker({ dateFormat: "@", // Unix timestamp onSelect: function(dateText, inst){ addOrRemoveDate(dateText); }, beforeShowDay: function(date){ var gotDate = $.inArray($.datepicker.formatDate($(this).datepicker('option', 'dateFormat'), date), dates); if (gotDate >= 0) { return [false,"ui-state-highlight", "Event Name"]; } return [true, ""]; } });