我想使用Fullcalendar: can it work with Google Calendars set to private?中给出的第一个答案将私人Google日历的事件导入fullCakendar。我正在使用http://plnkr.co/edit/tkK8rk?p=preview中给出的示例并尝试修改它以满足我的需要。我在第34行之后的angular-ui-calendar.js中包含了以下代码:
var extras = {
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
//events: $.fullCalendar.gcalFeed($feed_url.val()) ,
selectable: true,
selectHelper: true,
select: function(start, end) {
var title = prompt('Event Title:');
var eventData;
if (title) {
eventData = {
title: title,
start: start,
end: end
};
scope.calendar.fullCalendar('renderEvent', eventData, true); // stick? = true
}
scope.calendar.fullCalendar('unselect');
},
editable: true,
eventStartEditable : true ,
allDayDefault : false ,
droppable: true, // this allows things to be dropped onto the calendar
//eventLimit: true,
eventDurationEditable : true ,
eventRender: function (event, element) {
element.bind('mousedown', function (e) {
if (e.which == 3) {
scope.calendar.fullCalendar('removeEvents',event._id);
}
});
},
} ;
scope.calendar.fullCalendar(extras);
一切正常,但日历不支持拖动事件和更改持续时间。我不知道问题是什么。有人能帮我吗 ?