# eventAllow

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

Exact programmatic control over where an event can be dropped.

<div class='spec' markdown='1'>
function(dropInfo, draggedEvent)
</div>

After it has been determined that the [eventOverlap](https://legacy.fullcalendar.io/v3/eventOverlap.md) and [eventConstraint](https://legacy.fullcalendar.io/v3/eventConstraint.md) settings will allow the user to drop an event at a given position on the calendar, the `eventAllow` callback will be called. It will be called for every new potential droppable position as the user is dragging.

If specified, it must return either `true` or `false` as to whether the calendar will allow the given event (`draggedEvent`) to be dropped at the given location (`dropInfo`).

```js
eventAllow: function(dropLocation, draggedEvent) {
  if (draggedEvent.id === '999') {
    return dropLocation.start.isAfter('2016-01-01'); // a boolean
  }
  else {
    return true;
  }
}
```

The `dropLocation` object will have the following properties:

- `start` (a [Moment](https://legacy.fullcalendar.io/v3/moment.md))
- `end` exclusive end date/time (a [Moment](https://legacy.fullcalendar.io/v3/moment.md))
- `resourceId` if you are using a [Resource View](https://legacy.fullcalendar.io/v3/scheduler.md)


## Resources

In addition to receiving information about which date the user is attempting to drop the event upon, it will also receive information about the *resource*:

```js
eventAllow: function(dropLocation, draggedEvent) {
  if (draggedEvent.id === '999') {
    return String(dropLocation.resourceId).indexOf('a') >= 0; // boolean
  }
  else {
    return true;
  }
}
```

Only available with the [Scheduler plugin](https://fullcalendar.io/pricing).
