Skip to content

CalendarEvent

Manages events in calendars.

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

identifier

Identifier of event.

identifier: string

title

Title of event.

title: string

location

Location of event.

location: string

notes

Notes associated with event.

notes: string

startDate

Start date of event.

startDate: Date

endDate

End date of event.

endDate: Date

isAllDay

Whether the event is an all-day event.

isAllDay: bool

attendees

Attendees associated with the event.

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.

attendees: [any]

availability

Availability during the event.

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.

availability: string

timeZone

Time zone of event.

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

timeZone: string

calendar

Calendar the event is stored in.

calendar: Calendar

-new CalendarEvent

Constructs an event.

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

new CalendarEvent()

-addRecurrenceRule

Adds a recurrence rule.

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

addRecurrenceRule(recurrenceRule: RecurrenceRule)

-removeAllRecurrenceRules

Removes all recurrence removes.

removeAllRecurrenceRules()

-save

Saves event.

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

save()

-remove

Removes event from calendar.

remove()

-presentEdit

Presents a view for editing the calendar event.

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

presentEdit(): Promise<CalendarEven>

+presentCreate

Presents a view for creating a calendar event.

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

static presentCreate(): Promise<CalendarEven>

+today

Events occurring today.

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

+tomorrow

Events occurring tomorrow.

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

+yesterday

Events that occurred yesterday.

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

+thisWeek

Events that occur this week.

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

+nextWeek

Events that occur next week.

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

+lastWeek

Events that occurred last week.

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

+between

Events that occurs between two dates.

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