我如何 beforeShowDay 突出显示对象中的值?
beforeShowDay: function(date) {
var date = $("#calendar").datepicker({
dateFormat: 'yy-mm-dd'
}).val();
var date = highdate;
console.log(highdate);
console.log(hightext);
var Highlight = highdate[date];
var HighlighText = hightext[date];
if (Highlight) {
return [true, "Highlighted", HighlighText];
} else {
return [true, '', ''];
}
}
2.highdate Objects
Object
0:"2018-04-04"
1:"2018-04-30"
__proto__:Object
3.hightext Objects
Object
0:"text1"
1:"text2"
__proto__:Object
4.css
.Highlighted a {
background-color: Green !important;
background-image: none !important;
color: White !important;
font-weight: bold !important;
font-size: 12pt;
}