# eventResize

> FullCalendar v4 documentation, for an old release. Web version: https://legacy.fullcalendar.io/v4/eventResize
>
> Latest version (v7): https://fullcalendar.io/docs/eventResize.md

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

<div class='spec' markdown='1'>
function( *eventResizeInfo* ) { }
</div>

`eventResizeInfo` is a plain object with the following properties:

<table>

<tr>
<th>el</th>
<td markdown='1'>
The HTML element that was being dragged.
</td>
</tr>

<tr>
<th>endDelta</th>
<td markdown='1'>
A [Duration Object](https://legacy.fullcalendar.io/v4/duration-object.md) that represents the amount of time the event's **end date** was moved by.
</td>
</tr>

<tr>
<th>event</th>
<td markdown='1'>
An [Event Object](https://legacy.fullcalendar.io/v4/event-object.md) that holds information about the event (date, title, etc) **after** the resize.
</td>
</tr>

<tr>
<th>jsEvent</th>
<td markdown='1'>
The native JavaScript event with low-level information such as click coordinates.
</td>
</tr>

<tr>
<th>prevEvent</th>
<td markdown='1'>
An [Event Object](https://legacy.fullcalendar.io/v4/event-object.md) that holds information about the event **before** the resize.
</td>
</tr>

<tr>
<th>revert</th>
<td markdown='1'>
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.
</td>
</tr>

<tr>
<th>startDelta</th>
<td markdown='1'>
A [Duration Object](https://legacy.fullcalendar.io/v4/duration-object.md) that represents the amount of time the event's **start date** was moved by.
</td>
</tr>

<tr>
<th>view</th>
<td markdown='1'>
The current [View Object](https://legacy.fullcalendar.io/v4/view-object.md).
</td>
</tr>

</table>

Here is an example demonstrating most of these properties:

```js
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();
    }
  }

});
```
