eventResize
Triggered when resizing stops and the event has changed in duration.
function( eventResizeInfo ) { }
eventResizeInfo is a plain object with the following properties:
| el |
The HTML element that was being dragged. |
|---|---|
| endDelta |
A Duration Object that represents the amount of time the event’s end date was moved by. |
| event |
An Event Object that holds information about the event (date, title, etc) after the resize. |
| jsEvent |
The native JavaScript event with low-level information such as click coordinates. |
| prevEvent |
An Event Object that holds information about the event before the resize. |
| 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. |
| startDelta |
A Duration Object that represents the amount of time the event’s start date was moved by. |
| 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();
}
}
});