logo

FullCalendar

These are the new v4 docs! More info

eventResize

Triggered when resizing stops and the event has changed in duration.

function( eventResizeInfo ) { }

eventResizeInfo is a plain object with the following properties:

event

An Event Object that holds information about the event (date, title, etc) after the resize.

prevEvent

An Event Object that holds information about the event before the resize.

startDelta

A Duration Object that represents the amount of time the event’s start date was moved by.

endDelta

A Duration Object that represents the amount of time the event’s end date was moved by.

revert

A function that, if called, reverts the event’s start/end date to the values before the drag. This is useful if an ajax call should fail.

view

The current View Object.

Here is an example demonstrating most of these properties:

var calendar = new Calendar(calendarEl, {

  events: [
    // events here
  ],

  editable: true,

  eventResize: function(info) {
    alert(info.event.title + " end is now " + info.event.end.toISOString());

    if (!confirm("is this okay?")) {
      info.revert();
    }
  }

});