我在我的 Asp.Net 1.1 应用程序中使用 Fullcalendar。为了从服务器端获取数据,我使用 Ajaxpro。因此获取事件到 Fullcalendar 的代码如下所示:
$calendar.fullCalendar({
editable: true,
selectable: true,
theme: true,
height: 545,
defaultView: 'agendaWeek',
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
events: function(start, end, callback) {
dss.user_activity.getActivities(function(doc) {
var events = [];
var obj = jQuery.parseJSON(doc.value);
$(obj.Head).each(function() {
events.push({
id: this.SQ_USER_ACTIVITY_ID,
title: this.CH_SUBJECT,
start: this.start,
end: this.end,
allDay: this.BL_ALL_DAY
});
});
callback(events);
});
}
});
但是我有一个问题,当我拖动来自数据库的事件并切换日历的视图时,所有事件都会返回到它们的默认位置。
当我切换日历视图时,我希望更改事件以保护它们的位置。