edit doc

Event Object

A standard JavaScript object that FullCalendar uses to store information about a calendar event. It is exposed in various places of the API such as getEventById and provides methods for dynamic manipulation. It was originally parsed from a plain object.

var calendar = new Calendar(calendarEl, {
  timeZone: 'UTC',
  events: [
    {
      id: 'a',
      title: 'my event',
      start: '2018-09-01'
    }
  ]
})

var event = calendar.getEventById('a') // an event object!
var start = event.start // a property (a Date object)
console.log(start.toISOString()) // "2018-09-01T00:00:00.000Z"

An event object has a number of properties and methods. All properties are read-only and you must use the methods to modify the properties. Here is a list of all properties that exist on an event object:

id

String. Will uniquely identify your event. Leveraged by getEventById.

groupId

String. Events that share a groupId will be dragged and resized together automatically.

allDay

true or false. If the event is shown in the “all-day” section of the view if applicable. If the time text is displayed in the event.

start

Date object that obeys the current timeZone. When your event begins.

end

Date object that obeys the current timeZone. When your event ends. Could be null if you never specified an end.

This value is exclusive! I repeat, this value is exclusive!!! An event with the end of 2018-09-03 will appear to span through the 2nd of the month, but will end before the start of the 3rd of the month.

title

String. The text that will appear on an event.

url

String. A URL that will be visited when this event is clicked by the user. For more information on controlling this behavior, see the eventClick callback.

classNames

Array of className strings like [ 'myclass1', myclass2' ]. Determines which HTML classNames will be attached to the rendered event.

editable

true, false, or null. The value overriding the editable setting for this specific event.

startEditable

true, false, or null. The value overriding the eventStartEditable setting for this specific event.

durationEditable

true, false, or null. The value overriding the eventDurationEditable setting for this specific event.

resourceEditable

true, false, or null. The value overriding the eventResourceEditable setting for this specific event.

rendering

The rendering type of this event. Can be empty (normal rendering), "background", or "inverse-background"

overlap

The value overriding the eventOverlap setting for this specific event. If false, prevents this event from being dragged/resized over other events. Also prevents other events from being dragged/resized over this event. Does not accept a function.

constraint

The eventConstraint override for this specific event.

backgroundColor

The eventBackgroundColor override for this specific event.

borderColor

The eventBorderColor override for this specific event.

textColor

The eventTextColor override for this specific event.

extendedProps

A plain object holding miscellaneous other properties specified during parsing. Receives properties in the explicitly given extendedProps hash as well as other non-standard properties.

source

A reference to the Event Source this event came from. If the event was added dynamically via addEvent, and the source parameter was not specified, this value will be null.

All properties are read-only. If you want to modify them, use the various methods of the Event object, such as setProp, setExtendedProp, setDates, etc.