在此之前你应该引入fullCalendar的插件:
实现的效果图可查看:点击日期可改变日期的状态(工作日和非工作日的切换)
首先是jsp页面:
日期信息管理$(document).ready(function() {
//日历显示字体
var currentLangCode = 'zh-cn';
// build the language selector's options
$.each($.fullCalendar.langs, function(langCode) {
$('#lang-selector').append(
$('')
.attr('value', langCode)
.prop('selected', langCode == currentLangCode)
.text(langCode)
);
});
// rerender the calendar when the selected option changes
$('#lang-selector').on('change', function() {
if (this.value) {
currentLangCode = this.value;
$('#calendar').fullCalendar('destroy');
renderCalendar();
}
});
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWee