下图是功能实现的效果图,

要引用两个文件 是fullcalendar.js与fullcalendar.css。
<sc
jQuery(document).ready(function() {
jQuery('#calendar').fullCalendar({
header: {
left: 'prev,next',
center: 'ti
right: 'today'
},
buttonText: {
today: '今天',
prev: '上月',
next: '下月',
},
monthNames: ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'],
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
events: function(start, end, callback) {
$.ajax({
url: '{:U("Console/Totals/info")}',
type: 'post',
async: true, //异步请求
dataType: 'json',
success: function(data){ // 获取当前月的数据
var events = [];
if ( data.status == '1' ) {
$.each(data.info,function(i,c) {
//alert(i);alert(c.areaname+','+c.areanum+'单');alert(c.datetime);
events.push({
ti
start: c.datetime ,
color: '#1caf9a'
});
});
}
callback(events);
}
});
}
});
});
</sc
详细的请下载日历.zip压缩包吧,还有不懂的可以在下面留言,看到会第一时间给出回复。
最后一句: 技术无价,不喜勿喷。
日历.zip
( 22.94 KB 下载:102 次 )