---
title: CalendarEvent
description: Manages events in calendars.
---

Manages events in calendars.

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

## Properties

### attendees

Attendees associated with the event.

```typescript
attendees: [any]
```

An array of objects on the following form:



```javascript
{
  "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

Availability during the event.

```typescript
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

Calendar the event is stored in.

```typescript
calendar: Calendar
```

### endDate

End date of event.

```typescript
endDate: Date
```

### identifier

Identifier of event.

```typescript
identifier: string
```

Read-only.

### isAllDay

Whether the event is an all-day event.

```typescript
isAllDay: bool
```

### location

Location of event.

```typescript
location: string
```

### notes

Notes associated with event.

```typescript
notes: string
```

### startDate

Start date of event.

```typescript
startDate: Date
```

### timeZone

Time zone of event.

```typescript
timeZone: string
```

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

### title

Title of event.

```typescript
title: string
```

## Methods

<span id="-new-calendarevent" class="api-anchor"></span>

### new CalendarEvent()

Constructs an event.

```typescript
new CalendarEvent()
```

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

<span id="-addrecurrencerule" class="api-anchor"></span>

### addRecurrenceRule(recurrenceRule)

Adds a recurrence rule.

```typescript
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.

#### Parameters

**`recurrenceRule` `RecurrenceRule`**

Recurrence rule to add to the reminder.

<span id="between" class="api-anchor"></span>

### between(startDate, endDate, calendars)

Events that occurs between two dates.

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

#### Parameters

**`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.

#### Return value

**`Promise<[CalendarEvent]>`**

Promise that provides the events when fulfilled.

<span id="lastweek" class="api-anchor"></span>

### lastWeek(calendars)

Events that occurred last week.

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

#### Parameters

**`calendars` `[Calendar]`**

Calendars to fetch events for. Defaults to all calendars.

#### Return value

**`Promise<[CalendarEvent]>`**

Promise that provides the events when fulfilled.

<span id="nextweek" class="api-anchor"></span>

### nextWeek(calendars)

Events that occur next week.

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

#### Parameters

**`calendars` `[Calendar]`**

Calendars to fetch events for. Defaults to all calendars.

#### Return value

**`Promise<[CalendarEvent]>`**

Promise that provides the events when fulfilled.

### presentCreate()

Presents a view for creating a calendar event.

```typescript
static presentCreate(): Promise<CalendarEvent>
```

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

#### Return value

**`Promise<CalendarEvent>`**

Promise that provides the created event when fulfilled.

<span id="-presentedit" class="api-anchor"></span>

### presentEdit()

Presents a view for editing the calendar event.

```typescript
presentEdit(): Promise<CalendarEvent>
```

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

#### Return value

**`Promise<CalendarEvent>`**

Promise that provides the updated event when fulfilled.

<span id="-remove" class="api-anchor"></span>

### remove()

Removes event from calendar.

```typescript
remove()
```

<span id="-removeallrecurrencerules" class="api-anchor"></span>

### removeAllRecurrenceRules()

Removes all recurrence rules.

```typescript
removeAllRecurrenceRules()
```

<span id="-save" class="api-anchor"></span>

### save()

Saves event.

```typescript
save()
```

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

<span id="thisweek" class="api-anchor"></span>

### thisWeek(calendars)

Events that occur this week.

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

#### Parameters

**`calendars` `[Calendar]`**

Calendars to fetch events for. Defaults to all calendars.

#### Return value

**`Promise<[CalendarEvent]>`**

Promise that provides the events when fulfilled.

<span id="today" class="api-anchor"></span>

### today(calendars)

Events occurring today.

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

#### Parameters

**`calendars` `[Calendar]`**

Calendars to fetch events for. Defaults to all calendars.

#### Return value

**`Promise<[CalendarEvent]>`**

Promise that provides the events when fulfilled.

<span id="tomorrow" class="api-anchor"></span>

### tomorrow(calendars)

Events occurring tomorrow.

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

#### Parameters

**`calendars` `[Calendar]`**

Calendars to fetch events for. Defaults to all calendars.

#### Return value

**`Promise<[CalendarEvent]>`**

Promise that provides the events when fulfilled.

<span id="yesterday" class="api-anchor"></span>

### yesterday(calendars)

Events that occurred yesterday.

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

#### Parameters

**`calendars` `[Calendar]`**

Calendars to fetch events for. Defaults to all calendars.

#### Return value

**`Promise<[CalendarEvent]>`**

Promise that provides the events when fulfilled.