我正在使用fullCalendar,我希望得到"结束"调整大小后事件的属性值如下:
第一次活动"游戏日" 我开始= 2016年8月1日星期一01:00:00 GMT + 0100(西)和 结束= 2016年8月2日星期三01:00:00 GMT + 0100(WEST) 如何在手动调整事件大小后获取end的值 这是我的代码:
$scope.listEvents = [{
title: 'Gaming Day',
start: '2016-08-13T12:00:00',
end: '2016-08-15T00:00:00',
color: #9b59b6,
allDay: true
}, {
title: 'Live Conference',
start: new Date(y, m, 3)
}, {
title: 'Top Secret Project',
start: new Date(y, m, 4),
end: new Date(y, m, 8),
color: '#1abc9c'
}];
$('#calendar').fullCalendar({
header: {
left: 'prev,next',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
firstDay: 1,
editable: true,
droppable: true,
drop: function(date, allDay) { // this function is called when something is dropped
// retrieve the dropped element's stored Event Object
var originalEventObject = $(this).data('eventObject');
// we need to copy it, so that multiple events don't have a reference to the same object
var copiedEventObject = $.extend({}, originalEventObject);
// assign it the date that was reported
copiedEventObject.start = date;
// render the event on the calendar
// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
$('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
// remove the element from the "Draggable Events" list
$(this).remove();
},
events: $scope.listEvents,
eventDrop: function(event, delta, revertFunc) {
/* After a drag and drop of my event I get the new position with this */
console.log(event.title);
if (event.start) console.log(event.start._d);
if (event.end) console.log(event.end._d);
}
});
因此,在调整事件大小后,我如何才能获得新的结束日期?