$('#calendar').fullCalendar({
monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
firstDay: 1,
editable: false,//是否可拖拽显示的日程
events: function (start, end, callback) {
$.ajax({
type: "POST",
url: "./code/WebMethod.aspx/getdate",
dataType: "json",
data: {
channelid: 13,
departId:{GZ_departId},
start: $.fullCalendar.formatDate(start, "yyyy-MM-dd HH:mm:ss"),
end: $.fullCalendar.formatDate(end, "yyyy-MM-dd HH:mm:ss")
},
success: function (JsonResult) {
var events = [];
for (var i = 0; i < JsonResult.length; i++) {
events.push({
id: JsonResult[i].Id,
title: JsonResult[i].Title,
start: new Date(Date.parse(JsonResult[i].StartDate)),
end: new Date(Date.parse(JsonResult[i].EndDate)),
allDay: JsonResult[i].Alldate,
color: JsonResult[i].color
});
}
callback(events);
},
});
},
eventMouseover:function(start, end, callback)
{
var html = $(this).html();
$(this).html(html+"
这时一条显示的信息!");
}