class sap.ui.unified.CalendarRow

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

A calendar row with a header and appointments. The Appointments will be placed in the defined interval.


Constructor

Constructor for a new CalendarRow.

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.CalendarRow(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
appointmentHeight sap.ui.unified.CalendarAppointmentHeight Regular

Defines the height of the CalendarAppoinment

Since: 1.81.0.

Visibility: public
appointmentRoundWidth sap.ui.unified.CalendarAppointmentRoundWidth None

Defines rounding of the width of CalendarAppoinment Note: This property is applied, when the calendar interval type is day and the view shows more than 20 days

Since: 1.81.0.

Visibility: public
appointmentsReducedHeight boolean false

If set the appointments without text (only title) are rendered with a smaller height.

Note: On phone devices this property is ignored, appointments are always rendered in full height to allow touching.

Since: 1.38.0.

Visibility: public
appointmentsVisualization sap.ui.unified.CalendarAppointmentVisualization Standard

Defines the visualization of the CalendarAppoinment

Note: The real visualization depends on the used theme.

Since: 1.40.0.

Visibility: public
checkResize boolean true

If set, the CalendarRow checks for resize by itself.

If a lot of CalendarRow controls are used in one container control (like PlanningCalendar). the resize checks should be done only by this container control. Then the container control should call handleResize of the CalendarRow if a resize happens.

Visibility: public
groupAppointmentsMode sap.ui.unified.GroupAppointmentsMode Collapsed

Defines the mode in which the overlapping appointments are displayed.

Note: This property takes effect, only if the intervalType of the current calendar view is set to sap.ui.unified.CalendarIntervalType.Month. On phone devices this property is ignored, and the default value is applied.

Visibility: public
height sap.ui.core.CSSSize

Height of the row

Visibility: public
intervalSize int 1

Number of interval type units merged. It's used when presenting Relative View in sap.m.PlanningCalendar. Note: If the value is more than 1, the NonWorkingDays type is not presented.

Visibility: public
intervalType sap.ui.unified.CalendarIntervalType Hour

Type of the intervals of the row. The default is one hour.

Visibility: public
intervals int 12

Number of displayed intervals. The size of the intervals is defined with intervalType

Visibility: public
nonWorkingDays int[]

If set, the provided weekdays are displayed as non-working days. Valid values inside the array are 0 to 6. (Other values will just be ignored.)

If not set, the weekend defined in the locale settings is displayed as non-working days.

Note: The non working days are only visualized if intervalType is set to day.

Visibility: public
nonWorkingHours int[]

If set, the provided hours are displayed as non-working hours. Valid values inside the array are 0 to 23. (Other values will just be ignored.)

Note: The non working hours are only visualized if intervalType is set to hour.

Visibility: public
showEmptyIntervalHeaders boolean true

If set, interval headers are shown even if no intervalHeaders are assigned to the visible time frame.

If not set, no interval headers are shown if no intervalHeaders are assigned.

Note: This property is only used if showIntervalHeaders is set to true.

Since: 1.38.0.

Visibility: public
showIntervalHeaders boolean true

If set, interval headers are shown like specified in showEmptyIntervalHeaders.

If not set, no interval headers are shown even if intervalHeaders are assigned.

Visibility: public
showSubIntervals boolean false

If set, subintervals are shown.

If the interval type is Hour, quarter hours are shown.

If the interval type is Day, hours are shown.

If the interval type is Month, days are shown.

Visibility: public
startDate object

Start date, as JavaScript Date object, of the row. As default, the current date is used.

Visibility: public
updateCurrentTime boolean true

If set the CalendarRow triggers a periodic update to visualize the current time.

If a lot of CalendarRow controls are used in one container control (like PlanningCalendar) the periodic update should be triggered only by this container control. Then the container control should call updateCurrentTimeVisualization of the CalendarRow to update the visualization.

Visibility: public
width sap.ui.core.CSSSize

Width of the row

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
appointments 0..n sap.ui.unified.CalendarAppointment

Appointments to be displayed in the row. Appointments outside the visible time frame are not rendered.

Note: For performance reasons, only appointments in the visible time range or nearby should be assigned.

groupAppointments 0..n sap.ui.unified.CalendarAppointment
intervalHeaders 0..n sap.ui.unified.CalendarAppointment

Appointments to be displayed in the top of the intervals. The intervalHeaders are used to visualize public holidays and similar things.

Appointments outside the visible time frame are not rendered.

The intervalHeaders always fill whole intervals. If they are shorter than one interval, they are not displayed.

Note: For performance reasons, only appointments in the visible time range or nearby should be assigned.


Associations

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

Association to controls / IDs which label this control (see WAI-ARIA attribute aria-labelledby).

Note These labels are also assigned to the appointments.

legend 0..1 sap.ui.unified.CalendarLegend

Association to the CalendarLegend explaining the colors of the Appointments.

Note The legend does not have to be rendered but must exist, and all required types must be assigned.

Since: 1.40.0.


Events Overview

Event Description
intervalSelect

Fired if an interval was selected

Since: 1.38.0.

leaveRow

The CalendarRow should be left while navigating. (Arrow up or arrow down.) The caller should determine the next control to be focused

select

Fired if an appointment was selected

startDateChange

startDate was changed while navigating in CalendarRow

intervalSelect

Fired if an interval was selected

Since: 1.38.0.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
startDate object

Interval start date as JavaScript date object

endDate object

Interval end date as JavaScript date object

subInterval boolean

If set, the selected interval is a subinterval

leaveRow

The CalendarRow should be left while navigating. (Arrow up or arrow down.) The caller should determine the next control to be focused

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
type string

The type of the event that triggers this leaveRow

select

Fired if an appointment was selected

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
appointment sap.ui.unified.CalendarAppointment

selected appointment

appointments sap.ui.unified.CalendarAppointment[]

selected appointments in case a group appointment is selected

multiSelect boolean

If set, the appointment was selected by multiple selection (e.g. shift + mouse click). So more than the current appointment could be selected.

domRefId string

Gives the ID of the DOM element of the clicked appointment

Since: 1.50.

startDateChange

startDate was changed while navigating in CalendarRow

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

Methods Overview

Method Description
addAppointment

Adds some appointment to the aggregation appointments.

addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

addIntervalHeader

Adds some intervalHeader to the aggregation intervalHeaders.

attachIntervalSelect

Attaches event handler fnFunction to the intervalSelect event of this sap.ui.unified.CalendarRow.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.unified.CalendarRow itself.

Fired if an interval was selected

attachLeaveRow

Attaches event handler fnFunction to the leaveRow event of this sap.ui.unified.CalendarRow.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.unified.CalendarRow itself.

The CalendarRow should be left while navigating. (Arrow up or arrow down.) The caller should determine the next control to be focused

attachSelect

Attaches event handler fnFunction to the select event of this sap.ui.unified.CalendarRow.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.unified.CalendarRow itself.

Fired if an appointment was selected

attachStartDateChange

Attaches event handler fnFunction to the startDateChange event of this sap.ui.unified.CalendarRow.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.unified.CalendarRow itself.

startDate was changed while navigating in CalendarRow

destroyAppointments

Destroys all the appointments in the aggregation appointments.

destroyIntervalHeaders

Destroys all the intervalHeaders in the aggregation intervalHeaders.

detachIntervalSelect

Detaches event handler fnFunction from the intervalSelect event of this sap.ui.unified.CalendarRow.

The passed function and listener object must match the ones used for event registration.

detachLeaveRow

Detaches event handler fnFunction from the leaveRow event of this sap.ui.unified.CalendarRow.

The passed function and listener object must match the ones used for event registration.

detachSelect

Detaches event handler fnFunction from the select event of this sap.ui.unified.CalendarRow.

The passed function and listener object must match the ones used for event registration.

detachStartDateChange

Detaches event handler fnFunction from the startDateChange event of this sap.ui.unified.CalendarRow.

The passed function and listener object must match the ones used for event registration.

sap.ui.unified.CalendarRow.extend

Creates a new subclass of class sap.ui.unified.CalendarRow 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.core.Control.extend.

fireIntervalSelect

Fires event intervalSelect to attached listeners.

fireLeaveRow

Fires event leaveRow to attached listeners.

fireSelect

Fires event select to attached listeners.

fireStartDateChange

Fires event startDateChange to attached listeners.

focusAppointment

Focus the given CalendarAppointment in the CalendarRow.

focusNearestAppointment

Focus the CalendarAppointment in the CalendarRow that is nearest to the given date.

getAppointmentHeight

Gets current value of property appointmentHeight.

Defines the height of the CalendarAppoinment

Default value is Regular.

getAppointmentRoundWidth

Gets current value of property appointmentRoundWidth.

Defines rounding of the width of CalendarAppoinment Note: This property is applied, when the calendar interval type is day and the view shows more than 20 days

Default value is None.

getAppointments

Gets content of aggregation appointments.

Appointments to be displayed in the row. Appointments outside the visible time frame are not rendered.

Note: For performance reasons, only appointments in the visible time range or nearby should be assigned.

getAppointmentsReducedHeight

Gets current value of property appointmentsReducedHeight.

If set the appointments without text (only title) are rendered with a smaller height.

Note: On phone devices this property is ignored, appointments are always rendered in full height to allow touching.

Default value is false.

Since 1.81 Please use the <code>appointmentHeight</code> with value "Automatic" property instead.
getAppointmentsVisualization

Gets current value of property appointmentsVisualization.

Defines the visualization of the CalendarAppoinment

Note: The real visualization depends on the used theme.

Default value is Standard.

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getCheckResize

Gets current value of property checkResize.

If set, the CalendarRow checks for resize by itself.

If a lot of CalendarRow controls are used in one container control (like PlanningCalendar). the resize checks should be done only by this container control. Then the container control should call handleResize of the CalendarRow if a resize happens.

Default value is true.

getFocusedAppointment

Returns the focused CalendarAppointment of the CalendarRow.

The focus must not really be on the CalendarAppointment, it have just to be the one that has the focus when the CalendarRow was focused last time.

getGroupAppointmentsMode

Gets current value of property groupAppointmentsMode.

Defines the mode in which the overlapping appointments are displayed.

Note: This property takes effect, only if the intervalType of the current calendar view is set to sap.ui.unified.CalendarIntervalType.Month. On phone devices this property is ignored, and the default value is applied.

Default value is Collapsed.

getHeight

Gets current value of property height.

Height of the row

getIntervalHeaders

Gets content of aggregation intervalHeaders.

Appointments to be displayed in the top of the intervals. The intervalHeaders are used to visualize public holidays and similar things.

Appointments outside the visible time frame are not rendered.

The intervalHeaders always fill whole intervals. If they are shorter than one interval, they are not displayed.

Note: For performance reasons, only appointments in the visible time range or nearby should be assigned.

getIntervals

Gets current value of property intervals.

Number of displayed intervals. The size of the intervals is defined with intervalType

Default value is 12.

getIntervalSize

Gets current value of property intervalSize.

Number of interval type units merged. It's used when presenting Relative View in sap.m.PlanningCalendar. Note: If the value is more than 1, the NonWorkingDays type is not presented.

Default value is 1.

getIntervalType

Gets current value of property intervalType.

Type of the intervals of the row. The default is one hour.

Default value is Hour.

getLegend

ID of the element which is the current target of the association legend, or null.

sap.ui.unified.CalendarRow.getMetadata

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

getNonWorkingDays

Gets current value of property nonWorkingDays.

If set, the provided weekdays are displayed as non-working days. Valid values inside the array are 0 to 6. (Other values will just be ignored.)

If not set, the weekend defined in the locale settings is displayed as non-working days.

Note: The non working days are only visualized if intervalType is set to day.

getNonWorkingHours

Gets current value of property nonWorkingHours.

If set, the provided hours are displayed as non-working hours. Valid values inside the array are 0 to 23. (Other values will just be ignored.)

Note: The non working hours are only visualized if intervalType is set to hour.

getShowEmptyIntervalHeaders

Gets current value of property showEmptyIntervalHeaders.

If set, interval headers are shown even if no intervalHeaders are assigned to the visible time frame.

If not set, no interval headers are shown if no intervalHeaders are assigned.

Note: This property is only used if showIntervalHeaders is set to true.

Default value is true.

getShowIntervalHeaders

Gets current value of property showIntervalHeaders.

If set, interval headers are shown like specified in showEmptyIntervalHeaders.

If not set, no interval headers are shown even if intervalHeaders are assigned.

Default value is true.

getShowSubIntervals

Gets current value of property showSubIntervals.

If set, subintervals are shown.

If the interval type is Hour, quarter hours are shown.

If the interval type is Day, hours are shown.

If the interval type is Month, days are shown.

Default value is false.

getStartDate

Gets current value of property startDate.

Start date, as JavaScript Date object, of the row. As default, the current date is used.

getUpdateCurrentTime

Gets current value of property updateCurrentTime.

If set the CalendarRow triggers a periodic update to visualize the current time.

If a lot of CalendarRow controls are used in one container control (like PlanningCalendar) the periodic update should be triggered only by this container control. Then the container control should call updateCurrentTimeVisualization of the CalendarRow to update the visualization.

Default value is true.

getWidth

Gets current value of property width.

Width of the row

handleResize

After a resize of the CalendarRow, some calculations for appointment sizes are needed.

For this, each CalendarRow can trigger the resize check for it's own DOM. But if multiple CalendarRows are used in one container (e.g. PlanningCalendar), it is better if the container triggers the resize check once and then calls this function of each CalendarRow.

indexOfAppointment

Checks for the provided sap.ui.unified.CalendarAppointment in the aggregation appointments. and returns its index if found or -1 otherwise.

indexOfIntervalHeader

Checks for the provided sap.ui.unified.CalendarAppointment in the aggregation intervalHeaders. and returns its index if found or -1 otherwise.

insertAppointment

Inserts a appointment into the aggregation appointments.

insertIntervalHeader

Inserts a intervalHeader into the aggregation intervalHeaders.

removeAllAppointments

Removes all the controls from the aggregation appointments.

Additionally, it unregisters them from the hosting UIArea.

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllIntervalHeaders

Removes all the controls from the aggregation intervalHeaders.

Additionally, it unregisters them from the hosting UIArea.

removeAppointment

Removes a appointment from the aggregation appointments.

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

removeIntervalHeader

Removes a intervalHeader from the aggregation intervalHeaders.

setAppointmentHeight

Sets a new value for property appointmentHeight.

Defines the height of the CalendarAppoinment

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

Default value is Regular.

setAppointmentRoundWidth

Sets a new value for property appointmentRoundWidth.

Defines rounding of the width of CalendarAppoinment Note: This property is applied, when the calendar interval type is day and the view shows more than 20 days

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

Default value is None.

setAppointmentsReducedHeight

Sets a new value for property appointmentsReducedHeight.

If set the appointments without text (only title) are rendered with a smaller height.

Note: On phone devices this property is ignored, appointments are always rendered in full height to allow touching.

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

Default value is false.

Since 1.81 Please use the <code>appointmentHeight</code> with value "Automatic" property instead.
setAppointmentsVisualization

Sets a new value for property appointmentsVisualization.

Defines the visualization of the CalendarAppoinment

Note: The real visualization depends on the used theme.

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

Default value is Standard.

setCheckResize

Sets a new value for property checkResize.

If set, the CalendarRow checks for resize by itself.

If a lot of CalendarRow controls are used in one container control (like PlanningCalendar). the resize checks should be done only by this container control. Then the container control should call handleResize of the CalendarRow if a resize happens.

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

Default value is true.

setGroupAppointmentsMode

Sets a new value for property groupAppointmentsMode.

Defines the mode in which the overlapping appointments are displayed.

Note: This property takes effect, only if the intervalType of the current calendar view is set to sap.ui.unified.CalendarIntervalType.Month. On phone devices this property is ignored, and the default value is applied.

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

Default value is Collapsed.

setHeight

Sets a new value for property height.

Height of the row

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

setIntervals

Sets a new value for property intervals.

Number of displayed intervals. The size of the intervals is defined with intervalType

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

Default value is 12.

setIntervalSize

Sets a new value for property intervalSize.

Number of interval type units merged. It's used when presenting Relative View in sap.m.PlanningCalendar. Note: If the value is more than 1, the NonWorkingDays type is not presented.

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

Default value is 1.

setIntervalType

Sets a new value for property intervalType.

Type of the intervals of the row. The default is one hour.

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

Default value is Hour.

setLegend

Sets the associated legend.

setNonWorkingDays

Sets a new value for property nonWorkingDays.

If set, the provided weekdays are displayed as non-working days. Valid values inside the array are 0 to 6. (Other values will just be ignored.)

If not set, the weekend defined in the locale settings is displayed as non-working days.

Note: The non working days are only visualized if intervalType is set to day.

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

setNonWorkingHours

Sets a new value for property nonWorkingHours.

If set, the provided hours are displayed as non-working hours. Valid values inside the array are 0 to 23. (Other values will just be ignored.)

Note: The non working hours are only visualized if intervalType is set to hour.

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

setShowEmptyIntervalHeaders

Sets a new value for property showEmptyIntervalHeaders.

If set, interval headers are shown even if no intervalHeaders are assigned to the visible time frame.

If not set, no interval headers are shown if no intervalHeaders are assigned.

Note: This property is only used if showIntervalHeaders is set to true.

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

Default value is true.

setShowIntervalHeaders

Sets a new value for property showIntervalHeaders.

If set, interval headers are shown like specified in showEmptyIntervalHeaders.

If not set, no interval headers are shown even if intervalHeaders are assigned.

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

Default value is true.

setShowSubIntervals

Sets a new value for property showSubIntervals.

If set, subintervals are shown.

If the interval type is Hour, quarter hours are shown.

If the interval type is Day, hours are shown.

If the interval type is Month, days are shown.

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

Default value is false.

setStartDate

Sets a new value for property startDate.

Start date, as JavaScript Date object, of the row. As default, the current date is used.

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

setUpdateCurrentTime

Sets a new value for property updateCurrentTime.

If set the CalendarRow triggers a periodic update to visualize the current time.

If a lot of CalendarRow controls are used in one container control (like PlanningCalendar) the periodic update should be triggered only by this container control. Then the container control should call updateCurrentTimeVisualization of the CalendarRow to update the visualization.

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

Default value is true.

setWidth

Sets a new value for property width.

Width of the row

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

updateCurrentTimeVisualization

If the current time is in the visible output of the CalendarRow, the indicator for the current time must be positioned.

For this, each CalendarRow can trigger a timer. But if multiple CalendarRows are used in one container (e.G. PlanningCalendar), it is better if the container triggers the interval once and then calls this function of each CalendarRow.

addAppointment

Adds some appointment to the aggregation appointments.

Param Type DefaultValue Description
oAppointment sap.ui.unified.CalendarAppointment

The appointment to add; if empty, nothing is inserted

addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to add; if empty, nothing is inserted

addIntervalHeader

Adds some intervalHeader to the aggregation intervalHeaders.

Param Type DefaultValue Description
oIntervalHeader sap.ui.unified.CalendarAppointment

The intervalHeader to add; if empty, nothing is inserted

attachIntervalSelect

Attaches event handler fnFunction to the intervalSelect event of this sap.ui.unified.CalendarRow.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.unified.CalendarRow itself.

Fired if an interval was selected

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.unified.CalendarRow itself

attachLeaveRow

Attaches event handler fnFunction to the leaveRow event of this sap.ui.unified.CalendarRow.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.unified.CalendarRow itself.

The CalendarRow should be left while navigating. (Arrow up or arrow down.) The caller should determine the next control to be focused

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.unified.CalendarRow itself

attachSelect

Attaches event handler fnFunction to the select event of this sap.ui.unified.CalendarRow.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.unified.CalendarRow itself.

Fired if an appointment was selected

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.unified.CalendarRow itself

attachStartDateChange

Attaches event handler fnFunction to the startDateChange event of this sap.ui.unified.CalendarRow.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.unified.CalendarRow itself.

startDate was changed while navigating in CalendarRow

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.unified.CalendarRow itself

destroyAppointments

Destroys all the appointments in the aggregation appointments.

destroyIntervalHeaders

Destroys all the intervalHeaders in the aggregation intervalHeaders.

detachIntervalSelect

Detaches event handler fnFunction from the intervalSelect event of this sap.ui.unified.CalendarRow.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachLeaveRow

Detaches event handler fnFunction from the leaveRow event of this sap.ui.unified.CalendarRow.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachSelect

Detaches event handler fnFunction from the select event of this sap.ui.unified.CalendarRow.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachStartDateChange

Detaches event handler fnFunction from the startDateChange event of this sap.ui.unified.CalendarRow.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.ui.unified.CalendarRow.extend

Creates a new subclass of class sap.ui.unified.CalendarRow 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.core.Control.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

fireIntervalSelect

Fires event intervalSelect to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

startDate object

Interval start date as JavaScript date object

endDate object

Interval end date as JavaScript date object

subInterval boolean

If set, the selected interval is a subinterval

fireLeaveRow

Fires event leaveRow to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

type string

The type of the event that triggers this leaveRow

fireSelect

Fires event select to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

appointment sap.ui.unified.CalendarAppointment

selected appointment

appointments sap.ui.unified.CalendarAppointment[]

selected appointments in case a group appointment is selected

multiSelect boolean

If set, the appointment was selected by multiple selection (e.g. shift + mouse click). So more than the current appointment could be selected.

domRefId string

Gives the ID of the DOM element of the clicked appointment

fireStartDateChange

Fires event startDateChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

focusAppointment

Focus the given CalendarAppointment in the CalendarRow.

Param Type DefaultValue Description
oAppointment sap.ui.unified.CalendarAppointment

Appointment to be focused.

focusNearestAppointment

Focus the CalendarAppointment in the CalendarRow that is nearest to the given date.

Param Type DefaultValue Description
oDate object

Javascript Date object.

getAppointmentHeight

Gets current value of property appointmentHeight.

Defines the height of the CalendarAppoinment

Default value is Regular.

getAppointmentRoundWidth

Gets current value of property appointmentRoundWidth.

Defines rounding of the width of CalendarAppoinment Note: This property is applied, when the calendar interval type is day and the view shows more than 20 days

Default value is None.

getAppointments

Gets content of aggregation appointments.

Appointments to be displayed in the row. Appointments outside the visible time frame are not rendered.

Note: For performance reasons, only appointments in the visible time range or nearby should be assigned.

getAppointmentsReducedHeight

Gets current value of property appointmentsReducedHeight.

If set the appointments without text (only title) are rendered with a smaller height.

Note: On phone devices this property is ignored, appointments are always rendered in full height to allow touching.

Default value is false.

Since 1.81 Please use the <code>appointmentHeight</code> with value "Automatic" property instead.

getAppointmentsVisualization

Gets current value of property appointmentsVisualization.

Defines the visualization of the CalendarAppoinment

Note: The real visualization depends on the used theme.

Default value is Standard.

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getCheckResize

Gets current value of property checkResize.

If set, the CalendarRow checks for resize by itself.

If a lot of CalendarRow controls are used in one container control (like PlanningCalendar). the resize checks should be done only by this container control. Then the container control should call handleResize of the CalendarRow if a resize happens.

Default value is true.

getFocusedAppointment

Returns the focused CalendarAppointment of the CalendarRow.

The focus must not really be on the CalendarAppointment, it have just to be the one that has the focus when the CalendarRow was focused last time.

getGroupAppointmentsMode

Gets current value of property groupAppointmentsMode.

Defines the mode in which the overlapping appointments are displayed.

Note: This property takes effect, only if the intervalType of the current calendar view is set to sap.ui.unified.CalendarIntervalType.Month. On phone devices this property is ignored, and the default value is applied.

Default value is Collapsed.

getHeight

Gets current value of property height.

Height of the row

getIntervalHeaders

Gets content of aggregation intervalHeaders.

Appointments to be displayed in the top of the intervals. The intervalHeaders are used to visualize public holidays and similar things.

Appointments outside the visible time frame are not rendered.

The intervalHeaders always fill whole intervals. If they are shorter than one interval, they are not displayed.

Note: For performance reasons, only appointments in the visible time range or nearby should be assigned.

getIntervals

Gets current value of property intervals.

Number of displayed intervals. The size of the intervals is defined with intervalType

Default value is 12.

getIntervalSize

Gets current value of property intervalSize.

Number of interval type units merged. It's used when presenting Relative View in sap.m.PlanningCalendar. Note: If the value is more than 1, the NonWorkingDays type is not presented.

Default value is 1.

getIntervalType

Gets current value of property intervalType.

Type of the intervals of the row. The default is one hour.

Default value is Hour.

getLegend

ID of the element which is the current target of the association legend, or null.

sap.ui.unified.CalendarRow.getMetadata

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

getNonWorkingDays

Gets current value of property nonWorkingDays.

If set, the provided weekdays are displayed as non-working days. Valid values inside the array are 0 to 6. (Other values will just be ignored.)

If not set, the weekend defined in the locale settings is displayed as non-working days.

Note: The non working days are only visualized if intervalType is set to day.

getNonWorkingHours

Gets current value of property nonWorkingHours.

If set, the provided hours are displayed as non-working hours. Valid values inside the array are 0 to 23. (Other values will just be ignored.)

Note: The non working hours are only visualized if intervalType is set to hour.

getShowEmptyIntervalHeaders

Gets current value of property showEmptyIntervalHeaders.

If set, interval headers are shown even if no intervalHeaders are assigned to the visible time frame.

If not set, no interval headers are shown if no intervalHeaders are assigned.

Note: This property is only used if showIntervalHeaders is set to true.

Default value is true.

getShowIntervalHeaders

Gets current value of property showIntervalHeaders.

If set, interval headers are shown like specified in showEmptyIntervalHeaders.

If not set, no interval headers are shown even if intervalHeaders are assigned.

Default value is true.

getShowSubIntervals

Gets current value of property showSubIntervals.

If set, subintervals are shown.

If the interval type is Hour, quarter hours are shown.

If the interval type is Day, hours are shown.

If the interval type is Month, days are shown.

Default value is false.

getStartDate

Gets current value of property startDate.

Start date, as JavaScript Date object, of the row. As default, the current date is used.

getUpdateCurrentTime

Gets current value of property updateCurrentTime.

If set the CalendarRow triggers a periodic update to visualize the current time.

If a lot of CalendarRow controls are used in one container control (like PlanningCalendar) the periodic update should be triggered only by this container control. Then the container control should call updateCurrentTimeVisualization of the CalendarRow to update the visualization.

Default value is true.

getWidth

Gets current value of property width.

Width of the row

handleResize

After a resize of the CalendarRow, some calculations for appointment sizes are needed.

For this, each CalendarRow can trigger the resize check for it's own DOM. But if multiple CalendarRows are used in one container (e.g. PlanningCalendar), it is better if the container triggers the resize check once and then calls this function of each CalendarRow.

Param Type DefaultValue Description
oEvent jQuery.Event

The event object of the resize handler.

indexOfAppointment

Checks for the provided sap.ui.unified.CalendarAppointment in the aggregation appointments. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oAppointment sap.ui.unified.CalendarAppointment

The appointment whose index is looked for

indexOfIntervalHeader

Checks for the provided sap.ui.unified.CalendarAppointment in the aggregation intervalHeaders. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oIntervalHeader sap.ui.unified.CalendarAppointment

The intervalHeader whose index is looked for

insertAppointment

Inserts a appointment into the aggregation appointments.

Param Type DefaultValue Description
oAppointment sap.ui.unified.CalendarAppointment

The appointment to insert; if empty, nothing is inserted

iIndex int

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

insertIntervalHeader

Inserts a intervalHeader into the aggregation intervalHeaders.

Param Type DefaultValue Description
oIntervalHeader sap.ui.unified.CalendarAppointment

The intervalHeader to insert; if empty, nothing is inserted

iIndex int

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

removeAllAppointments

Removes all the controls from the aggregation appointments.

Additionally, it unregisters them from the hosting UIArea.

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllIntervalHeaders

Removes all the controls from the aggregation intervalHeaders.

Additionally, it unregisters them from the hosting UIArea.

removeAppointment

Removes a appointment from the aggregation appointments.

Param Type DefaultValue Description
vAppointment int string sap.ui.unified.CalendarAppointment

The appointment to remove or its index or id

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy int sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to be removed or its index or ID

removeIntervalHeader

Removes a intervalHeader from the aggregation intervalHeaders.

Param Type DefaultValue Description
vIntervalHeader int string sap.ui.unified.CalendarAppointment

The intervalHeader to remove or its index or id

setAppointmentHeight

Sets a new value for property appointmentHeight.

Defines the height of the CalendarAppoinment

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

Default value is Regular.

Param Type DefaultValue Description
sAppointmentHeight sap.ui.unified.CalendarAppointmentHeight Regular

New value for property appointmentHeight

setAppointmentRoundWidth

Sets a new value for property appointmentRoundWidth.

Defines rounding of the width of CalendarAppoinment Note: This property is applied, when the calendar interval type is day and the view shows more than 20 days

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

Default value is None.

Param Type DefaultValue Description
sAppointmentRoundWidth sap.ui.unified.CalendarAppointmentRoundWidth None

New value for property appointmentRoundWidth

setAppointmentsReducedHeight

Sets a new value for property appointmentsReducedHeight.

If set the appointments without text (only title) are rendered with a smaller height.

Note: On phone devices this property is ignored, appointments are always rendered in full height to allow touching.

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

Default value is false.

Since 1.81 Please use the <code>appointmentHeight</code> with value "Automatic" property instead.
Param Type DefaultValue Description
bAppointmentsReducedHeight boolean false

New value for property appointmentsReducedHeight

setAppointmentsVisualization

Sets a new value for property appointmentsVisualization.

Defines the visualization of the CalendarAppoinment

Note: The real visualization depends on the used theme.

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

Default value is Standard.

Param Type DefaultValue Description
sAppointmentsVisualization sap.ui.unified.CalendarAppointmentVisualization Standard

New value for property appointmentsVisualization

setCheckResize

Sets a new value for property checkResize.

If set, the CalendarRow checks for resize by itself.

If a lot of CalendarRow controls are used in one container control (like PlanningCalendar). the resize checks should be done only by this container control. Then the container control should call handleResize of the CalendarRow if a resize happens.

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

Default value is true.

Param Type DefaultValue Description
bCheckResize boolean true

New value for property checkResize

setGroupAppointmentsMode

Sets a new value for property groupAppointmentsMode.

Defines the mode in which the overlapping appointments are displayed.

Note: This property takes effect, only if the intervalType of the current calendar view is set to sap.ui.unified.CalendarIntervalType.Month. On phone devices this property is ignored, and the default value is applied.

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

Default value is Collapsed.

Param Type DefaultValue Description
sGroupAppointmentsMode sap.ui.unified.GroupAppointmentsMode Collapsed

New value for property groupAppointmentsMode

setHeight

Sets a new value for property height.

Height of the row

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

Param Type DefaultValue Description
sHeight sap.ui.core.CSSSize

New value for property height

setIntervals

Sets a new value for property intervals.

Number of displayed intervals. The size of the intervals is defined with intervalType

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

Default value is 12.

Param Type DefaultValue Description
iIntervals int 12

New value for property intervals

setIntervalSize

Sets a new value for property intervalSize.

Number of interval type units merged. It's used when presenting Relative View in sap.m.PlanningCalendar. Note: If the value is more than 1, the NonWorkingDays type is not presented.

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

Default value is 1.

Param Type DefaultValue Description
iIntervalSize int 1

New value for property intervalSize

setIntervalType

Sets a new value for property intervalType.

Type of the intervals of the row. The default is one hour.

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

Default value is Hour.

Param Type DefaultValue Description
sIntervalType sap.ui.unified.CalendarIntervalType Hour

New value for property intervalType

setLegend

Sets the associated legend.

Param Type DefaultValue Description
oLegend sap.ui.core.ID sap.ui.unified.CalendarLegend

ID of an element which becomes the new target of this legend association; alternatively, an element instance may be given

setNonWorkingDays

Sets a new value for property nonWorkingDays.

If set, the provided weekdays are displayed as non-working days. Valid values inside the array are 0 to 6. (Other values will just be ignored.)

If not set, the weekend defined in the locale settings is displayed as non-working days.

Note: The non working days are only visualized if intervalType is set to day.

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

Param Type DefaultValue Description
sNonWorkingDays int[]

New value for property nonWorkingDays

setNonWorkingHours

Sets a new value for property nonWorkingHours.

If set, the provided hours are displayed as non-working hours. Valid values inside the array are 0 to 23. (Other values will just be ignored.)

Note: The non working hours are only visualized if intervalType is set to hour.

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

Param Type DefaultValue Description
sNonWorkingHours int[]

New value for property nonWorkingHours

setShowEmptyIntervalHeaders

Sets a new value for property showEmptyIntervalHeaders.

If set, interval headers are shown even if no intervalHeaders are assigned to the visible time frame.

If not set, no interval headers are shown if no intervalHeaders are assigned.

Note: This property is only used if showIntervalHeaders is set to true.

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

Default value is true.

Param Type DefaultValue Description
bShowEmptyIntervalHeaders boolean true

New value for property showEmptyIntervalHeaders

setShowIntervalHeaders

Sets a new value for property showIntervalHeaders.

If set, interval headers are shown like specified in showEmptyIntervalHeaders.

If not set, no interval headers are shown even if intervalHeaders are assigned.

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

Default value is true.

Param Type DefaultValue Description
bShowIntervalHeaders boolean true

New value for property showIntervalHeaders

setShowSubIntervals

Sets a new value for property showSubIntervals.

If set, subintervals are shown.

If the interval type is Hour, quarter hours are shown.

If the interval type is Day, hours are shown.

If the interval type is Month, days are shown.

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
bShowSubIntervals boolean false

New value for property showSubIntervals

setStartDate

Sets a new value for property startDate.

Start date, as JavaScript Date object, of the row. As default, the current date is used.

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

Param Type DefaultValue Description
oStartDate object

New value for property startDate

setUpdateCurrentTime

Sets a new value for property updateCurrentTime.

If set the CalendarRow triggers a periodic update to visualize the current time.

If a lot of CalendarRow controls are used in one container control (like PlanningCalendar) the periodic update should be triggered only by this container control. Then the container control should call updateCurrentTimeVisualization of the CalendarRow to update the visualization.

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

Default value is true.

Param Type DefaultValue Description
bUpdateCurrentTime boolean true

New value for property updateCurrentTime

setWidth

Sets a new value for property width.

Width of the row

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

Param Type DefaultValue Description
sWidth sap.ui.core.CSSSize

New value for property width

updateCurrentTimeVisualization

If the current time is in the visible output of the CalendarRow, the indicator for the current time must be positioned.

For this, each CalendarRow can trigger a timer. But if multiple CalendarRows are used in one container (e.G. PlanningCalendar), it is better if the container triggers the interval once and then calls this function of each CalendarRow.