You are reading 13.1.1. See this page in 13.4.1.
Titanium.Calendar.Event
Extends Titanium.Proxy
An object that represents a single event in a calendar.
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 for examples of retrieving event information and creating events.
Properties 21
Alarms associated with the calendar item, as an array of Titanium.Calendar.Alert objects.
This property is read-only on Android.
allDay
BooleanIndicates whether this event is all day.
This property is read-only on Android.
Default: false
Inherited from Titanium.Proxy
The name of the API that this proxy corresponds to.
The list of event attendees. This list will be empty if the event has no attendees.
Availability of this event.
begin
DateStart date/time of this event.
This property is read-only on Android.
Inherited from Titanium.Proxy
Indicates if the proxy will bubble an event to its parent.
Default: true
Description of this event.
end
DateEnd date/time of this event.
This property is read-only on Android.
Extended properties of this event.
Indicates whether an alarm is scheduled for this event.
Identifier of this event.
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.
Inherited from Titanium.Proxy
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
location
StringLocation of this event.
This property is read-only on Android.
Notes for this event.
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.
Existing reminders for this event.
Status of this event.
title
StringTitle of this event.
This property is read-only on Android.
Visibility of this event.
Methods 14
Inherited from Titanium.Proxy
Adds the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to invoke when the event is fired. 4 fields
|
addRecurrenceRule
iPhoneiPadmacOSAdds a recurrence rule to the recurrence rule array.
| Parameters | Type | Description |
|---|---|---|
| rule | Titanium.Calendar.RecurrenceRule | The recurrence rule to be added. |
applyProperties
since 3.0.0Inherited from Titanium.Proxy
Applies the properties to the proxy.
| Parameters | Type | Description |
|---|---|---|
| props | Dictionary | A dictionary of properties to apply. |
Creates an alert for this event.
| Parameters | Type | Description |
|---|---|---|
| data | Dictionary<Titanium.Calendar.Alert> | Properties for the alert. |
createRecurrenceRule
since 7.1.0Creates 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 | Type | Description |
|---|---|---|
| data | Dictionary<Titanium.Calendar.RecurrenceRule> | Properties for the recurrence rule. |
createReminder
AndroidCreates a reminder for this event.
| Parameters | Type | Description |
|---|---|---|
| data | Dictionary<Titanium.Calendar.Reminder> | Properties for the reminder. |
Inherited from Titanium.Proxy
Fires a synthesized event to any registered listeners.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| event? | Dictionary | A dictionary of keys and values to add to the Titanium.Event object sent to the listeners. |
getExtendedProperty
AndroidGets the value of the specified extended property.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of an existing extended property. |
refresh
iPhoneiPadmacOSUpdates 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 notification. If this method returns NO, the event has been deleted or otherwise invalidated, and you should not continue to use it.
remove
since Android 12.4.0, iPhone 3.1.0, iPad 3.1.0, macOS 9.2.0Removes an event from the calendar.
This method raises an exception on iOS if an event from another calendar is used.
| Parameters | Type | Description |
|---|---|---|
| span | Number | iOS-only: The span to use. Indicates whether to remove future instances of the event in the case of a recurring event. |
Inherited from Titanium.Proxy
Removes the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to remove. Must be the same function passed to 4 fields
|
removeRecurrenceRule
iPhoneiPadmacOSRemoves a recurrence rule to the recurrence rule array.
| Parameters | Type | Description |
|---|---|---|
| rule | Titanium.Calendar.RecurrenceRule | The recurrence rule to be removed. |
save
since Android 7.1.0, iPhone 3.1.0, iPad 3.1.0Saves 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 to track this new feature.
| Parameters | Type | Description |
|---|---|---|
| span | Number | The span to use. Indicates whether the save affects future instances of the event in the case of a recurring event. |
setExtendedProperty
AndroidSets the value of the specified extended property.
| Parameters | Type | Description |
|---|---|---|
| name | String | Property name. |
| value | String | Property value. |