2016-03-29 1 views
0

FullcalendarsのrevertFunc()でイベントドロップを手動で拒否すると、カレンダーの作成時に設定された 'dragRevertDuration'オプションが使用されていないように見えます(イベントが重複=偽の場合、例えば他のイベントでドラッグ/ドロップされる)。 'revertFunc()'を 'dragRevertDuration'と共に使用することは可能ですか?Fullcalendar revertFunc()+ dragRevertDuration

Fullcalendarドキュメント(+ dragRevertDurationプロパティ)多分あなたはドロップイベントのパラメータを勘違いしている

$('#calendar').fullCalendar({ 
    events: [ 
     // events here 
    ], 
    editable: true, 
    dragRevertDuration: 1000, 
    eventDrop: function(event, delta, revertFunc) { 
     if (!confirm("Are you sure about this change?")) { 
      revertFunc(); 
     } 
    } 
}); 

答えて

0

、イベントのサイズを変更

としてその同じではありませんが、これは私のために正常に動作し、このパラメータを試してみてください(ドロップやサイズを変更するイベント)のための

かのパラメータをチェックし、その後動作していない、この1、

(私はバージョンFullCalendarのv1.5.4を使用しています)

eventDrop: function(event, dayDelta, minuteDelta, allDay, revertFunc) { 
    alert("Move Event : "+event.title+" to "+event.start); 

    if (!confirm("is this okay?")) { 
     revertFunc(); 
    }else{ 
     console.log(event); 
     alert(event.title + " end is now " + event.end); 
    }   
}, 
eventResize: function(event, delta, allDay, revertFunc) { 
    alert(event.title + " end is now " + event.end); 
    if (!confirm("is this okay?")) { 
     revertFunc(); 
    } 
}, 
関連する問題