我有一个日历,其中突出显示了一些日期
在我想突出显示 2013 年 3 月 31 日之后的日期之前,它工作得非常好。在那之后,日期就正常显示了。
有人知道为什么会这样吗?
这是我用来突出显示日期的代码
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
var SelectedDates = {};
SelectedDates[new Date('2013-02-14')] = new Date('2013-02-14');
SelectedDates[new Date('2013-02-15')] = new Date('2013-02-15');
SelectedDates[new Date('2013-02-16')] = new Date('2013-02-16');
SelectedDates[new Date('2013-02-22')] = new Date('2013-02-22');
SelectedDates[new Date('2013-02-23')] = new Date('2013-02-23');
SelectedDates[new Date('2013-03-01')] = new Date('2013-03-01');
SelectedDates[new Date('2013-04-01')] = new Date('2013-04-01');
SelectedDates[new Date('2013-04-11')] = new Date('2013-04-11');
$('#datepicker').datepicker({
altField: "#alternate", altFormat: "yy-mm-dd", maxDate: "+12M", dateFormat: "yy-mm-dd",
beforeShowDay: function(date) {
var Highlight = SelectedDates[date];
if (Highlight) {
return [true, "Highlighted", Highlight];
}
else {
return [true, '', ''];
}
}
});
});
//]]>
</script>
<style>
div.ui-datepicker{
font-size:250%;
}
.Highlighted a{
background-color : #800000 !important;
background-image :none !important;
color: White !important;
font-weight:bold !important;
font-size: 22pt;
}
</style>