# Titanium.Calendar.Event

> An object that represents a single event in a calendar.

- Source: https://titaniumsdk.com/docs/sdk/12.6.0/Titanium.Calendar.Event
- Titanium SDK version: 12.6.0
- Kind: proxy
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK Android 3.2.0, iPhone 3.1.0, iPad 3.1.0
- Extends: Titanium.Proxy
- Inheritance: Titanium.Proxy

The API supports retrieving information about existing events and creating new events.
On iOS, existing events can be modified or deleted. On Android, only recurrence rules
can be modified.

See [Titanium.Calendar](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.md) for examples of retrieving event information and creating events.

## Properties

### alerts

- Type: Array<Titanium.Calendar.Alert>
- Platforms: Android, iPhone, iPad, macOS

Alarms associated with the calendar item, as an array of [Titanium.Calendar.Alert](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.Alert.md) objects.

This property is read-only on Android.

### allDay

- Type: Boolean
- Platforms: Android, iPhone, iPad, macOS
- Default: `false`

Indicates whether this event is all day.

This property is read-only on Android.

### attendees

- Type: Array<Titanium.Calendar.Attendee>
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.0.0
- Permission: read-only

The list of event attendees. This list will be empty if the event has no attendees.

### availability

- Type: Number
- Platforms: iPhone, iPad, macOS

Availability of this event.

Accepts: `Titanium.Calendar.AVAILABILITY_BUSY`, `Titanium.Calendar.AVAILABILITY_FREE`, `Titanium.Calendar.AVAILABILITY_NOTSUPPORTED`, `Titanium.Calendar.AVAILABILITY_TENTATIVE`, `Titanium.Calendar.AVAILABILITY_UNAVAILABLE`

### begin

- Type: Date
- Platforms: Android, iPhone, iPad, macOS

Start date/time of this event.

This property is read-only on Android.

### description

- Type: String
- Platforms: Android
- Permission: read-only

Description of this event.

### end

- Type: Date
- Platforms: Android, iPhone, iPad, macOS

End date/time of this event.

This property is read-only on Android.

### extendedProperties

- Type: Dictionary
- Platforms: Android
- Permission: read-only

Extended properties of this event.

### hasAlarm

- Type: Boolean
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only

Indicates whether an alarm is scheduled for this event.

### id

- Type: String
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only

Identifier of this event.

### isDetached

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Boolean value that indicates whether an event is a detached instance of a
repeating event.

This value is `YES` if and only if the event is part of a repeating event
and one or more of its attributes have been modified from the repeating event's
default attributes.

### location

- Type: String
- Platforms: Android, iPhone, iPad, macOS

Location of this event.

This property is read-only on Android.

### notes

- Type: String
- Platforms: iPhone, iPad, macOS

Notes for this event.

### recurrenceRules

- Type: Array<Titanium.Calendar.RecurrenceRule>
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK Android 7.1.0, iPhone 3.1.0, iPad 3.1.0

The recurrence rules for the calendar item.

On Android, only the first element of the recurrenceRules is taken into account
due to the way it handles conditions for recurrence rules.

### reminders

- Type: Array<Titanium.Calendar.Reminder>
- Platforms: Android
- Permission: read-only

Existing reminders for this event.

### status

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only

Status of this event.

Accepts: `Titanium.Calendar.STATUS_CANCELED`, `Titanium.Calendar.STATUS_CONFIRMED`, `Titanium.Calendar.STATUS_NONE`, `Titanium.Calendar.STATUS_TENTATIVE`

### title

- Type: String
- Platforms: Android, iPhone, iPad, macOS

Title of this event.

This property is read-only on Android.

### visibility

- Type: Number
- Platforms: Android
- Permission: read-only

Visibility of this event.

Accepts: `Titanium.Calendar.VISIBILITY_CONFIDENTIAL`, `Titanium.Calendar.VISIBILITY_DEFAULT`, `Titanium.Calendar.VISIBILITY_PRIVATE`, `Titanium.Calendar.VISIBILITY_PUBLIC`

## Methods

### addRecurrenceRule

- Platforms: iPhone, iPad, macOS

Adds a recurrence rule to the recurrence rule array.

Parameters:

- `rule` (Titanium.Calendar.RecurrenceRule): The recurrence rule to be added.

### createAlert

- Platforms: Android, iPhone, iPad, macOS

Creates an alert for this event.

Parameters:

- `data` (Dictionary<Titanium.Calendar.Alert>): Properties for the alert.

Returns: Titanium.Calendar.Alert

### createRecurrenceRule

- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 7.1.0

Creates an recurrence pattern for a recurring event.
All of the properties for the recurrence rule must be set during creation.
The recurrence rule properties cannot be modified.

Parameters:

- `data` (Dictionary<Titanium.Calendar.RecurrenceRule>): Properties for the recurrence rule.

Returns: Titanium.Calendar.RecurrenceRule

### createReminder

- Platforms: Android

Creates a reminder for this event.

Parameters:

- `data` (Dictionary<Titanium.Calendar.Reminder>): Properties for the reminder.

Returns: Titanium.Calendar.Reminder

### getExtendedProperty

- Platforms: Android

Gets the value of the specified extended property.

Parameters:

- `name` (String): Name of an existing extended property.

Returns: String

### refresh

- Platforms: iPhone, iPad, macOS

Updates the event's data with the current information in the Calendar database.

This method should be only used on events that your application is editing, and only
when your application receives the [change](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.md#change) notification.
If this method returns NO, the event has been deleted or otherwise invalidated,
and you should not continue to use it.

Returns: Boolean

### remove

- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK Android 12.4.0, iPhone 3.1.0, iPad 3.1.0, macOS 9.2.0

Removes an event from the calendar.

This method raises an exception on iOS if an event from another calendar is used.

Parameters:

- `span` (Number): iOS-only: The span to use. Indicates whether to remove future instances of the event in the case of a recurring event. Default: `<Titanium.Calendar.SPAN_THISEVENT>`.

Returns: Boolean

### removeRecurrenceRule

- Platforms: iPhone, iPad, macOS

Removes a recurrence rule to the recurrence rule array.

Parameters:

- `rule` (Titanium.Calendar.RecurrenceRule): The recurrence rule to be removed.

### save

- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK Android 7.1.0, iPhone 3.1.0, iPad 3.1.0

Saves changes to an event permanently.

This method raises an exception if it is passed an event from another calendar.

When an event is saved, it is updated in the Calendar database. Any fields you did
not modify are updated to reflect the most recent value in the database. If the
event has been deleted from the database, it is re-created as a new event.

On Android, this method only updates the recurrence rule (if set). See [TIMOB-24248](https://jira-archive.titaniumsdk.com/TIMOB-24248)
to track this new feature.

Parameters:

- `span` (Number): The span to use. Indicates whether the save affects future instances of the event in the case of a recurring event. Default: `<Titanium.Calendar.SPAN_THISEVENT>`.

Returns: Boolean

### setExtendedProperty

- Platforms: Android

Sets the value of the specified extended property.

Parameters:

- `name` (String): Property name.
- `value` (String): Property value.

## Inherited members

7 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/12.6.0/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `lifecycleContainer`, `removeEventListener`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

