Skip to content
Titanium SDK
Version13.3.1

You are reading 13.3.1. See this page in 13.4.1.

Titanium.Calendar.Calendar

proxyAndroidiPhoneiPadmacOSsince Android 3.2.0, iPhone 3.1.0, iPad 3.1.0

Extends Titanium.Proxy

An object that represents a single calendar.

Properties 10

apiName

Stringsince Android 3.2.0, iPhone 3.2.0, iPad 3.2.0, macOS 9.2.0read-only

Inherited from Titanium.Proxy

The name of the API that this proxy corresponds to.

bubbleParent

Booleansince Android 3.0.0, iPhone 3.0.0, iPad 3.0.0, macOS 9.2.0

Inherited from Titanium.Proxy

Indicates if the proxy will bubble an event to its parent.

Default: true

hidden

Booleanread-only

Indicates whether this calendar can be edited or deleted.

This property is true when this calendar is editable.

id

Stringread-only

Identifier of this calendar.

name

Stringread-only

Display name of this calendar.

selected

BooleanAndroidread-only

Indicates whether the calendar is selected.

Set to true when this calendar is selected.

See Titanium.Calendar for examples.

sourceIdentifier

StringiPhoneiPadmacOSsince 6.1.0read-only

Displays the source identifier.

sourceTitle

StringiPhoneiPadmacOSsince 6.1.0read-only

Displays the source title.

Methods 13

Inherited from Titanium.Proxy

Adds the specified callback as an event listener for the named event.

Parameters
ParametersTypeDescription
nameString

Name of the event.

callbackCallback<Titanium.Event>

Callback function to invoke when the event is fired.

4 fields
bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.

createEvents

Androidsince 12.6.0

Creates multiple events at once in this calendar.

Use this method to bulk-create events for faster performance. Successful or failed results are returned at the same position as passed in the parameters list. For failed events, it will return null and Titanium.Calendar.Event for successful events.

Parameters
ParametersTypeDescription
propertiesArrayArray<Dictionary<Titanium.Calendar.Event>>

Array of the event properties

deleteEvents

Androidsince 12.6.0

Deletes multiple events with their specified identifier(s).

Use this method to bulk-delete events for faster performance. This method only returns the count of successfully deleted events. If it is important for apps to know whether the event was deleted or not, either use the remove() method, or a single identifier that is passed as an array to this method. If a specified identifier event does not exist, it will not be treated as a count, so the count range can be in 0 <= count <= ids.length.

Parameters
ParametersTypeDescription
idsArray<Number> | Array<String>

Array of identifiers of events.

Returns Number

Count of successfully deleted events.

Inherited from Titanium.Proxy

Fires a synthesized event to any registered listeners.

Parameters
ParametersTypeDescription
nameString

Name of the event.

event?Dictionary

A dictionary of keys and values to add to the Titanium.Event object sent to the listeners.

getEventsById

Androidsince 12.6.0

Gets multiple events with their specified identifier(s).

Use this method to bulk-fetch events for faster performance. Only successful events are returned, so the identifier of events should be used to compare which events were not fetched successfully.

Parameters
ParametersTypeDescription
idsArray<Number> | Array<String>

Array of identifiers of events.

Inherited from Titanium.Proxy

Removes the specified callback as an event listener for the named event.

Parameters
ParametersTypeDescription
nameString

Name of the event.

callbackCallback<Titanium.Event>

Callback function to remove. Must be the same function passed to addEventListener.

4 fields
bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.