# Titanium.Calendar.Calendar

> An object that represents a single calendar.

- Source: https://titaniumsdk.com/docs/sdk/12.5.0/Titanium.Calendar.Calendar
- Titanium SDK version: 12.5.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

## Properties

### hidden

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

Indicates whether this calendar can be edited or deleted.

This property is `true` when this calendar is editable.

### id

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

Identifier of this calendar.

### name

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

Display name of this calendar.

### selected

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

Indicates whether the calendar is selected.

Set to `true` when this calendar is selected.

See [Titanium.Calendar](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.md) for examples.

### sourceIdentifier

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

Displays the source identifier.

### sourceTitle

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

Displays the source title.

### sourceType

- Type: Number
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

Displays the source type.

Accepts: `Titanium.Calendar.SOURCE_TYPE_BIRTHDAYS`, `Titanium.Calendar.SOURCE_TYPE_CALDAV`, `Titanium.Calendar.SOURCE_TYPE_EXCHANGE`, `Titanium.Calendar.SOURCE_TYPE_LOCAL`, `Titanium.Calendar.SOURCE_TYPE_MOBILEME`, `Titanium.Calendar.SOURCE_TYPE_SUBSCRIBED`

## Methods

### createEvent

- Platforms: Android, iPhone, iPad, macOS

Creates an event in this calendar.

Parameters:

- `properties` (Dictionary<Titanium.Calendar.Event>): Properties of the event

Returns: Titanium.Calendar.Event

### getEventById

- Platforms: Android, iPhone, iPad, macOS

Gets the event with the specified identifier.

Parameters:

- `id` (String): Identifier of the event.

Returns: Titanium.Calendar.Event

### getEventsBetweenDates

- Platforms: Android, iPhone, iPad, macOS

Gets events that occur between two dates.

Parameters:

- `date1` (Date | String): Start date.
- `date2` (Date | String): End date.

Returns: Array<Titanium.Calendar.Event>

### getEventsInDate

- Platforms: Android, iPhone, iPad, macOS
- DEPRECATED since 7.0.0. Use [Titanium.Calendar.Calendar.getEventsBetweenDates](Titanium.Calendar.Calendar.getEventsBetweenDates) instead.

Gets events that occur on a specified date.

Parameters:

- `year` (Number): Year of the events.
- `month` (Number): Month of the events, as a zero-based integer with January at 0 and December at 11.
- `day` (Number): Day of the month of the events.

Returns: Array<Titanium.Calendar.Event>

### getEventsInMonth

- Platforms: Android, iPhone, iPad, macOS
- DEPRECATED since 7.0.0. Use [Titanium.Calendar.Calendar.getEventsBetweenDates](Titanium.Calendar.Calendar.getEventsBetweenDates) instead.

Gets events that occur during a specified month.

Parameters:

- `year` (Number): Year of the events.
- `month` (Number): Month of the events, as a zero-based integer with January at 0 and December at 11.

Returns: Array<Titanium.Calendar.Event>

### getEventsInYear

- Platforms: Android, iPhone, iPad, macOS
- DEPRECATED since 7.0.0. Use [Titanium.Calendar.Calendar.getEventsBetweenDates](Titanium.Calendar.Calendar.getEventsBetweenDates) instead.

Gets all events that occur during a specified year.

Parameters:

- `year` (Number): Year of the events.

Returns: Array<Titanium.Calendar.Event>

## Inherited members

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

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/12.5.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`.

