抱歉,如果这是重复的。在发布之前我已经搜索了很多,但找不到答案。
我正在使用全日历。它显示了一个漂亮的日历,通过“可编辑:真”选项,我可以拖动事件并将其移动到页面上的任何日期。但问题是永远不会调用“eventResize”函数。我的代码如下
function calendar() {
$('#calendar').fullCalendar({
locale: 'nl',
header: {
left:'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
timeFormat: 'H:mm',
allDaySlot: false,
eventSources: [
{
url: '/mypath/get_events',
type: 'post',
}
],
eventColor: '#cccccc',
editable: true,
eventResize: function(event,dayDelta,minuteDelta,revertFunc) {
alert("let's change the dates");
},
slotEventOverlap: true,
height: 'auto',
droppable: false
});
}
当然,我在上面有以下内容
<link rel="stylesheet" href="/mypath/fullcalendar/fullcalendar.min.css">
<link rel="stylesheet" href="/mypath/fullcalendar/fullcalendar.print.css" media="print">
<script type="text/javascript" src="/mypath/fullcalendar/jquery.min.js"></script>
<script type="text/javascript" src="/mypath/fullcalendar/moment.min.js"></script>
<script type="text/javascript" src="/mypath/fullcalendar/fullcalendar.min.js"></script>
我正在使用 fullCalendar 2.2.5 版,如果重要的话。