Skip to content

Calendar

Holds reminders and events.

Use the Calendar type to get a specific calendar. The calendar is used with the Reminder and CalendarEvent types when fetching reminders or events from a specific calendar or when inserting into a calendar. If you are fetching reminders or events from all calendars, you do not need to pass the calendars when performing the fetch with the Reminder or CalendarEvent types.

identifier

Calendar identifier.

identifier: string

title

Title of calendar.

title: string

isSubscribed

Whether the calendar is a subscribed calendar.

isSubscribed: bool

allowsContentModifications

Indicates whether items can be added, edited, and deleted in the calendar.

allowsContentModifications: bool

color

Color of calendar.

color: Color

-supportsAvailability

Checks if the calendar supports availability.

The following values are supported:

  • busy
  • free
  • tentative
  • unavailable

Not all calendars support all of these availabilities and some calendars may not support availability at all. Use this function to check if the calendar supports a specific availability.

supportsAvailability(availability: string): bool

+forReminders

Fetches calendars for reminders.

A calendar can only hold either reminders or events. Call this function to fetch all calendars that can hold reminders.

static forReminders(): Promise<[Calendar]>

+forEvents

Fetches calendars for events.

A calendar can only hold either reminders or events. Call this function to fetch all calendars that can hold events.

static forEvents(): Promise<[Calendar]>

+forRemindersByTitle

Fetches a calendar that holds reminders.

static forRemindersByTitle(title: string): Promise<Calendar>

+forEventsByTitle

Fetches a calendar that holds events.

static forEventsByTitle(title: string): Promise<Calendar>

+defaultForReminders

Default calendar for reminders.

A calendar can only hold either reminders or events. Call this function to get the default calendar that can hold reminders.

static defaultForReminders(): Promise<Calendar>

+defaultForEvents

Default calendar for events.

A calendar can only hold either reminders or events. Call this function to get the default calendar that can hold events.

static defaultForEvents(): Promise<Calendar>

+presentPicker

Presents a view for picking calendars.

static presentPicker(allowMultiple: bool): Promise<[Calendar]>