我希望为日期选择器中的特定日期指定特定的颜色,同时也禁用周末。请帮帮我。谢谢!
<script type="text/javascript">
$(document).ready(function() {
var LiveDates = {};
LiveDates[new Date('07/18/2019')] = new Date('07/18/2019');
$('.datepicker1').datepicker({
dateFormat: 'yy-mm-dd',
minDate: new Date({{a}},{{b}},{{c}}),
maxDate: new Date({{d}},{{e}},{{f}}),
beforeShowDay: function(date) {
var Highlight = LiveDates[date];
if (Highlight) {
return [true, "live", 'Tooltip text'];
}
else {
return [true, '', ''];
}
}
});
});
</script>