Skip to content

CalendarEvent

Manages events in calendars.

Used for creating, fetching and removing events from your calendars.

Attendees associated with the event.

attendees: [any]

An array of objects on the following form:

{
"isCurrentUser": false,
"name": "John Appleseed",
"status": "accepted",
"type": "person",
"role": "required"
}

Note that the property is read-only since iOS does not expose API to modify the attendees of an event.

Read-only.

Availability during the event.

availability: string

Indicates how the event should be treated for scheduling purposes. The following values are supported:

  • busy
  • free
  • tentative
  • unavailable

Be aware that not all calendars support all of these availabilities and some calendars may not support availability at all. Use Calendar.supportsAvailability() to check if a calendar supports a specific availability.

Calendar the event is stored in.

calendar: Calendar

End date of event.

endDate: Date

Identifier of event.

identifier: string

Read-only.

Whether the event is an all-day event.

isAllDay: bool

Location of event.

location: string

Notes associated with event.

notes: string

Start date of event.

startDate: Date

Time zone of event.

timeZone: string

Geopolitical region identifier that identifies the time zone, e.g. “Europe/Copenhagen”, “America/New_York” and “Asia/Tokyo”.

Title of event.

title: string

Constructs an event.

new CalendarEvent()

In order to add the event to your calendar, you must call the save() function.

Adds a recurrence rule.

addRecurrenceRule(recurrenceRule: RecurrenceRule)

Recurrence rules specify when the eventer or reminder should be repeated. See the documentation of RecurrenceRule for more information on creating rules.

recurrenceRule RecurrenceRule

Recurrence rule to add to the reminder.

Events that occurs between two dates.

static between(startDate: Date, endDate: Date, calendars: [Calendar]): Promise<[CalendarEvent]>

startDate Date

Start date to fetch events for.

endDate Date

End date to fetch events for.

calendars [Calendar]

Calendars to fetch events for. Defaults to all calendars.

Promise<[CalendarEvent]>

Promise that provides the events when fulfilled.

Events that occurred last week.

static lastWeek(calendars: [Calendar]): Promise<[CalendarEvent]>

calendars [Calendar]

Calendars to fetch events for. Defaults to all calendars.

Promise<[CalendarEvent]>

Promise that provides the events when fulfilled.

Events that occur next week.

static nextWeek(calendars: [Calendar]): Promise<[CalendarEvent]>

calendars [Calendar]

Calendars to fetch events for. Defaults to all calendars.

Promise<[CalendarEvent]>

Promise that provides the events when fulfilled.

Presents a view for creating a calendar event.

static presentCreate(): Promise<CalendarEvent>

The presented view supports editing various attributes of the event, including title, location, dates, recurrence and alerts.

Promise<CalendarEvent>

Promise that provides the created event when fulfilled.

Presents a view for editing the calendar event.

presentEdit(): Promise<CalendarEvent>

The presented view supports editing various attributes of the event, including title, location, dates, recurrence and alerts.

Promise<CalendarEvent>

Promise that provides the updated event when fulfilled.

Removes event from calendar.

remove()

Removes all recurrence rules.

removeAllRecurrenceRules()

Saves event.

save()

Saves changes to an event, inserting it into the calendar if it is newly created.

Events that occur this week.

static thisWeek(calendars: [Calendar]): Promise<[CalendarEvent]>

calendars [Calendar]

Calendars to fetch events for. Defaults to all calendars.

Promise<[CalendarEvent]>

Promise that provides the events when fulfilled.

Events occurring today.

static today(calendars: [Calendar]): Promise<[CalendarEvent]>

calendars [Calendar]

Calendars to fetch events for. Defaults to all calendars.

Promise<[CalendarEvent]>

Promise that provides the events when fulfilled.

Events occurring tomorrow.

static tomorrow(calendars: [Calendar]): Promise<[CalendarEvent]>

calendars [Calendar]

Calendars to fetch events for. Defaults to all calendars.

Promise<[CalendarEvent]>

Promise that provides the events when fulfilled.

Events that occurred yesterday.

static yesterday(calendars: [Calendar]): Promise<[CalendarEvent]>

calendars [Calendar]

Calendars to fetch events for. Defaults to all calendars.

Promise<[CalendarEvent]>

Promise that provides the events when fulfilled.