class sap.ui.unified.CalendarAppointment

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/unified/CalendarAppointment
Application Component: CA-UI5-CTR

An appointment for use in a PlanningCalendar or similar. The rendering must be done in the Row collecting the appointments. (Because there are different visualizations possible.)

Applications could inherit from this element to add own fields.


Constructor

Constructor for a new CalendarAppointment.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.ui.unified.CalendarAppointment(sId?, mSettings?)
Param Type Default Value Description
sId? string

ID for the new control, generated automatically if no ID is given

mSettings? object

Initial settings for the new control


Properties

Name Type Default Value Description
color sap.ui.core.CSSColor

Overrides the color derived from the type property. This property will work only with full hex color with pound symbol, e.g.: #FF0000.

Since: 1.46.0.

Visibility: public
description string

Description of the appointment.

Since: 1.81.0.

Visibility: public
icon sap.ui.core.URI

Icon of the Appointment. (e.g. picture of the person)

URI of an image or an icon registered in sap.ui.core.IconPool.

Visibility: public
key string

Can be used as identifier of the appointment

Visibility: public
selected boolean false

Indicates if the icon is selected.

Visibility: public
tentative boolean false

Indicates if the icon is tentative.

Visibility: public
text string

Text of the appointment.

Visibility: public
title string

Title of the appointment.

Visibility: public

Borrowed Properties

Name Type Default Value Description
color sap.ui.core.CSSColor

Background color of the Calendar specialDates aggregation. If set, this color will override the default background color defined in Calendar specialDates aggregation

Since: 1.76.0.

Visibility: public
secondaryType sap.ui.unified.CalendarDayType None

Applies secondary CalendarDayType combined with the CalendarDayType type chosen. Allows specialDates to be also a NonWorkingDay. The secondary day type can only be used for NonWorkingDay or None calendar day types. In other cases it will not be visible.

Since: 1.81.0.

Visibility: public
type sap.ui.unified.CalendarDayType Type01

Type of the date range.

Visibility: public
endDate object

End date for a date range. If empty only a single date is presented by this DateRange element. This must be a JavaScript date object.

Visibility: public
startDate object

Start date for a date range. This must be a JavaScript date object.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
customContent 0..n sap.ui.core.Control

Holds the content of the appointment.

Note , If the customContent aggregation is added then:

  • The title, text, description, and icon properties are ignored.
  • The application developer has to ensure, that all the accessibility requirements are met, and that the height of the content conforms with the height provided by the appointment.
  • Do not use interactive controls as content, as they may trigger unwanted selection of the appointment and may lead to unpredictable results.


Since: 1.93.0.


Methods Overview

Method Description
addCustomContent

Adds some customContent to the aggregation customContent.

destroyCustomContent

Destroys all the customContent in the aggregation customContent.

sap.ui.unified.CalendarAppointment.extend

Creates a new subclass of class sap.ui.unified.CalendarAppointment with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.unified.DateTypeRange.extend.

getColor

Gets current value of property color.

Overrides the color derived from the type property. This property will work only with full hex color with pound symbol, e.g.: #FF0000.

getCustomContent

Gets content of aggregation customContent.

Holds the content of the appointment.

Note , If the customContent aggregation is added then:

  • The title, text, description, and icon properties are ignored.
  • The application developer has to ensure, that all the accessibility requirements are met, and that the height of the content conforms with the height provided by the appointment.
  • Do not use interactive controls as content, as they may trigger unwanted selection of the appointment and may lead to unpredictable results.

getDescription

Gets current value of property description.

Description of the appointment.

getIcon

Gets current value of property icon.

Icon of the Appointment. (e.g. picture of the person)

URI of an image or an icon registered in sap.ui.core.IconPool.

getKey

Gets current value of property key.

Can be used as identifier of the appointment

sap.ui.unified.CalendarAppointment.getMetadata

Returns a metadata object for class sap.ui.unified.CalendarAppointment.

getSelected

Gets current value of property selected.

Indicates if the icon is selected.

Default value is false.

getTentative

Gets current value of property tentative.

Indicates if the icon is tentative.

Default value is false.

getText

Gets current value of property text.

Text of the appointment.

getTitle

Gets current value of property title.

Title of the appointment.

indexOfCustomContent

Checks for the provided sap.ui.core.Control in the aggregation customContent. and returns its index if found or -1 otherwise.

insertCustomContent

Inserts a customContent into the aggregation customContent.

removeAllCustomContent

Removes all the controls from the aggregation customContent.

Additionally, it unregisters them from the hosting UIArea.

removeCustomContent

Removes a customContent from the aggregation customContent.

setColor

Sets a new value for property color.

Overrides the color derived from the type property. This property will work only with full hex color with pound symbol, e.g.: #FF0000.

When called with a value of null or undefined, the default value of the property will be restored.

setDescription

Sets a new value for property description.

Description of the appointment.

When called with a value of null or undefined, the default value of the property will be restored.

setIcon

Sets a new value for property icon.

Icon of the Appointment. (e.g. picture of the person)

URI of an image or an icon registered in sap.ui.core.IconPool.

When called with a value of null or undefined, the default value of the property will be restored.

setKey

Sets a new value for property key.

Can be used as identifier of the appointment

When called with a value of null or undefined, the default value of the property will be restored.

setSelected

Sets a new value for property selected.

Indicates if the icon is selected.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

setTentative

Sets a new value for property tentative.

Indicates if the icon is tentative.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

setText

Sets a new value for property text.

Text of the appointment.

When called with a value of null or undefined, the default value of the property will be restored.

setTitle

Sets a new value for property title.

Title of the appointment.

When called with a value of null or undefined, the default value of the property will be restored.

addCustomContent

Adds some customContent to the aggregation customContent.

Param Type DefaultValue Description
oCustomContent sap.ui.core.Control

The customContent to add; if empty, nothing is inserted

destroyCustomContent

Destroys all the customContent in the aggregation customContent.

sap.ui.unified.CalendarAppointment.extend

Creates a new subclass of class sap.ui.unified.CalendarAppointment with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.unified.DateTypeRange.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

getColor

Gets current value of property color.

Overrides the color derived from the type property. This property will work only with full hex color with pound symbol, e.g.: #FF0000.

getCustomContent

Gets content of aggregation customContent.

Holds the content of the appointment.

Note , If the customContent aggregation is added then:

getDescription

Gets current value of property description.

Description of the appointment.

getIcon

Gets current value of property icon.

Icon of the Appointment. (e.g. picture of the person)

URI of an image or an icon registered in sap.ui.core.IconPool.

getKey

Gets current value of property key.

Can be used as identifier of the appointment

sap.ui.unified.CalendarAppointment.getMetadata

Returns a metadata object for class sap.ui.unified.CalendarAppointment.

getSelected

Gets current value of property selected.

Indicates if the icon is selected.

Default value is false.

getTentative

Gets current value of property tentative.

Indicates if the icon is tentative.

Default value is false.

getText

Gets current value of property text.

Text of the appointment.

getTitle

Gets current value of property title.

Title of the appointment.

indexOfCustomContent

Checks for the provided sap.ui.core.Control in the aggregation customContent. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oCustomContent sap.ui.core.Control

The customContent whose index is looked for

insertCustomContent

Inserts a customContent into the aggregation customContent.

Param Type DefaultValue Description
oCustomContent sap.ui.core.Control

The customContent to insert; if empty, nothing is inserted

iIndex int

The 0-based index the customContent should be inserted at; for a negative value of iIndex, the customContent is inserted at position 0; for a value greater than the current size of the aggregation, the customContent is inserted at the last position

removeAllCustomContent

Removes all the controls from the aggregation customContent.

Additionally, it unregisters them from the hosting UIArea.

removeCustomContent

Removes a customContent from the aggregation customContent.

Param Type DefaultValue Description
vCustomContent int string sap.ui.core.Control

The customContent to remove or its index or id

setColor

Sets a new value for property color.

Overrides the color derived from the type property. This property will work only with full hex color with pound symbol, e.g.: #FF0000.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sColor sap.ui.core.CSSColor

New value for property color

setDescription

Sets a new value for property description.

Description of the appointment.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sDescription string

New value for property description

setIcon

Sets a new value for property icon.

Icon of the Appointment. (e.g. picture of the person)

URI of an image or an icon registered in sap.ui.core.IconPool.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sIcon sap.ui.core.URI

New value for property icon

setKey

Sets a new value for property key.

Can be used as identifier of the appointment

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sKey string

New value for property key

setSelected

Sets a new value for property selected.

Indicates if the icon is selected.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Param Type DefaultValue Description
bSelected boolean false

New value for property selected

setTentative

Sets a new value for property tentative.

Indicates if the icon is tentative.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Param Type DefaultValue Description
bTentative boolean false

New value for property tentative

setText

Sets a new value for property text.

Text of the appointment.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sText string

New value for property text

setTitle

Sets a new value for property title.

Title of the appointment.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sTitle string

New value for property title