class sap.m.PlanningCalendar

Control sample: sap.m.PlanningCalendar
Visiblity: public
UX Guidelines: Planning Calendar
Implements:
Available since: N/A
Module: sap/m/PlanningCalendar
Application Component: CA-UI5-CTR

Displays rows with appointments for different entities (such as persons or teams) for the selected time interval.

Overview

You can use the PlanningCalendar to represent a calendar containing multiple rows with appointments, where each row represents a different person.

You can configure different time-interval views that the user can switch between, such as hours or days, and even a whole week/month. The available navigation allows the user to select a specific interval using a picker, or move to the previous/next interval using arrows.

Note: The application developer should add dependency to sap.ui.unified library on application level to ensure that the library is loaded before the module dependencies will be required. The PlanningCalendar uses parts of the sap.ui.unified library. This library will be loaded after the PlanningCalendar, if it wasn't loaded first. This could lead to CSP compliance issues and adds an additional waiting time when a PlanningCalendar is used for the first time. To prevent this, apps that use the PlanningCalendar should also load the sap.ui.unified library in advance.

Usage

The PlanningCalendar has the following structure from top to bottom:

Since 1.48 the empty space in the cell that is below an appointment can be removed by adding the sapUiCalendarAppFitVertically CSS class to the PlanningCalendar. Please note that it should be used only for a PlanningCalendar with one appointment per day for a row that doesn't have interval headers set.

Since 1.44 alternating row colors can be suppressed by adding the sapMPlanCalSuppressAlternatingRowColors CSS class to the PlanningCalendar.

Responsive behavior

You can define the number of displayed intervals based on the size of the PlanningCalendar using the PlanningCalendarView's properties.


Constructor

Constructor for a new PlanningCalendar.

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.m.PlanningCalendar(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

Determines the different possible sizes for appointments.

Since: 1.81.0.

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

Defines rounding of the width 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

Determines whether the appointments that have only title without text are rendered with smaller height.

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

Since: 1.38.0.

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

Determines how the appointments are visualized depending on the used theme.

Since: 1.40.0.

Visibility: public
builtInViews string[]

Defines the list of predefined views as an array. The views should be specified by their keys.

The default predefined views and their keys are available at sap.m.PlanningCalendarBuiltInView.

Note: If set, all specified views will be displayed along with any custom views (if available). If not set and no custom views are available, all default views will be displayed. If not set and there are any custom views available, only the custom views will be displayed.

Since: 1.50.

Visibility: public
firstDayOfWeek int -1

If set, the first day of the displayed week is this day. Valid values are 0 to 6 starting on Sunday. If there is no valid value set, the default of the used locale is used.

Note: this property will only have effect in the weekly – based views of the PlanningCalendar – Week view, and OneMonth view (on small devices).

Since: 1.94.

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.

Since: 1.48.0.

Visibility: public
height sap.ui.core.CSSSize

Specifies the height of the PlanningCalendar. Note: If the set height is less than the displayed content, it will not be applied

Visibility: public
maxDate object

Defines the maximum date that can be displayed and selected in the PlanningCalendar. This must be a JavaScript date object.

Note: If the maxDate is set to be before the current minDate, the minDate is set to the first date of the month in which the maxDate belongs.

Since: 1.38.0.

Visibility: public
minDate object

Defines the minimum date that can be displayed and selected in the PlanningCalendar. This must be a JavaScript date object.

Note: If the minDate is set to be after the current maxDate, the maxDate is set to the last date of the month in which the minDate belongs.

Since: 1.38.0.

Visibility: public
noDataText string

Defines the text that is displayed when no PlanningCalendarRows are assigned.

Visibility: public
showDayNamesLine boolean false

Determines whether the day names are displayed in a separate line or inside the single days.

Since: 1.50.

Visibility: public
showEmptyIntervalHeaders boolean true

Determines whether the space (at the top of the intervals), where the assigned interval headers appear, should remain visible even when no interval headers are present in the visible time frame. If set to false, this space would collapse/disappear when no interval headers are assigned.

Note: This property takes effect, only if showIntervalHeaders is also set to true.

Since: 1.38.0.

Visibility: public
showIntervalHeaders boolean true

Determines whether the assigned interval headers are displayed. You can assign them using the intervalHeaders aggregation of the PlanningCalendarRow.

Note: If you set both showIntervalHeaders and showEmptyIntervalHeaders properties to true, the space (at the top of the intervals) where the assigned interval headers appear, will remain visible even if no interval headers are assigned.

Visibility: public
showRowHeaders boolean true

Determines whether the column containing the headers of the PlanningCalendarRows is displayed.

Visibility: public
showWeekNumbers boolean false

Determines if the week numbers are displayed.

Since: 1.52.

Visibility: public
singleSelection boolean true

Determines whether only a single row can be selected.

Visibility: public
startDate object

Determines the start date of the row, as a JavaScript date object. The current date is used as default.

Visibility: public
stickyHeader boolean false

Determines whether the header area will remain visible (fixed on top) when the rest of the content is scrolled out of view.

The sticky header behavior is automatically disabled on phones in landscape mode for better visibility of the content.

Note: There is limited browser support, hence the API is in experimental state. Browsers that currently support this feature are Chrome (desktop and mobile), Safari (desktop and mobile) and Edge 41.

There are also some known issues with respect to the scrolling behavior and focus handling. A few are given below:

When the PlanningCalendar is placed in certain layout containers, for example the GridLayout control, the column headers do not fix at the top of the viewport. Similar behavior is also observed with the ObjectPage control.

This API should not be used in production environment.

Note: The stickyHeader of the PlanningCalendar uses the sticky property of sap.m.Table. Therefore, all features and restrictions of the property in sap.m.Table apply to the PlanningCalendar as well.

Since: 1.54.

Visibility: public
viewKey string sap.ui.unified.CalendarIntervalType.Hour

Defines the key of the PlanningCalendarView used for the output.

Note: The default value is set Hour. If you are using your own views, the keys of these views should be used instead.

Visibility: public
width sap.ui.core.CSSSize

Specifies the width of the PlanningCalendar.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
header 0..1 sap.ui.core.Control

Hidden, for internal use only.

rows 0..n sap.m.PlanningCalendarRow

Rows of the PlanningCalendar.

specialDates 0..n sap.ui.unified.DateTypeRange

Special days in the header calendar visualized as date range with a type.

Note: If one day is assigned to more than one type, only the first type will be used.

table 0..1 sap.m.Table

Hidden, for internal use only.

toolbarContent 0..n sap.ui.core.Control

The content of the toolbar.

views 0..n sap.m.PlanningCalendarView

Views of the PlanningCalendar.

Note: If not set, all the default views are available. Their keys are defined in sap.ui.unified.CalendarIntervalType.


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).

Since: 1.40.0.

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
appointmentSelect

Fired if an appointment is selected.

intervalSelect

Fired if an interval was selected in the calendar header or in the row.

rowHeaderClick

Fires when a row header is clicked.

Since: 1.46.0.

rowSelectionChange

Fires when row selection is changed.

startDateChange

Fired when the startDate property was changed while navigating in the PlanningCalendar. The new value can be obtained using the sap.m.PlanningCalendar#getStartDate() method. Note: This event is fired in case when the viewKey property is changed, and as a result of which the view requires a change in the startDate property.

viewChange

Fired when the viewKey property was changed by user interaction.

appointmentSelect

Fired if an appointment is selected.

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

The selected appointment.

appointments sap.ui.unified.CalendarAppointment[]

The selected appointments in case a group appointment is selected.

multiSelect boolean

If set, the appointment was selected using multiple selection (e.g. Shift + single mouse click), meaning more than the current appointment could be selected.

domRefId string

Gives the ID of the DOM element of the clicked appointment

Since: 1.50.0.

intervalSelect

Fired if an interval was selected in the calendar header or in the row.

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

Start date of the selected interval, as a JavaScript date object.

endDate object

Interval end date as a JavaScript date object.

Since: 1.38.0.

subInterval boolean

If set, the selected interval is a subinterval.

Since: 1.38.0.

row sap.m.PlanningCalendarRow

Row of the selected interval.

Since: 1.38.0.

rowHeaderClick

Fires when a row header is clicked.

Since: 1.46.0.

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

The ID of the PlanningCalendarRowHeader of the selected appointment.

Note: Intended to be used as an easy way to get an ID of a PlanningCalendarRowHeader. Do NOT use for modification.

Since: 1.73.

row sap.m.PlanningCalendarRow

The row user clicked on.

rowSelectionChange

Fires when row selection is changed.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
rows sap.m.PlanningCalendarRow[]

Array of rows whose selection has changed.

startDateChange

Fired when the startDate property was changed while navigating in the PlanningCalendar. The new value can be obtained using the sap.m.PlanningCalendar#getStartDate() method. Note: This event is fired in case when the viewKey property is changed, and as a result of which the view requires a change in the startDate property.

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

viewChange

Fired when the viewKey property was changed by user interaction.

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

Methods Overview

Method Description
addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

addRow

Adds some row to the aggregation rows.

addSpecialDate

Adds some specialDate to the aggregation specialDates.

addToolbarContent

Adds some toolbarContent to the aggregation toolbarContent.

addView

Adds some view to the aggregation views.

attachAppointmentSelect

Attaches event handler fnFunction to the appointmentSelect event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fired if an appointment is selected.

attachIntervalSelect

Attaches event handler fnFunction to the intervalSelect event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fired if an interval was selected in the calendar header or in the row.

attachRowHeaderClick

Attaches event handler fnFunction to the rowHeaderClick event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fires when a row header is clicked.

attachRowSelectionChange

Attaches event handler fnFunction to the rowSelectionChange event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fires when row selection is changed.

attachStartDateChange

Attaches event handler fnFunction to the startDateChange event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fired when the startDate property was changed while navigating in the PlanningCalendar. The new value can be obtained using the sap.m.PlanningCalendar#getStartDate() method. Note: This event is fired in case when the viewKey property is changed, and as a result of which the view requires a change in the startDate property.

attachViewChange

Attaches event handler fnFunction to the viewChange event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fired when the viewKey property was changed by user interaction.

destroyRows

Destroys all the rows in the aggregation rows.

destroySpecialDates

Destroys all the specialDates in the aggregation specialDates.

destroyToolbarContent

Destroys all the toolbarContent in the aggregation toolbarContent.

destroyViews

Destroys all the views in the aggregation views.

detachAppointmentSelect

Detaches event handler fnFunction from the appointmentSelect event of this sap.m.PlanningCalendar.

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

detachIntervalSelect

Detaches event handler fnFunction from the intervalSelect event of this sap.m.PlanningCalendar.

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

detachRowHeaderClick

Detaches event handler fnFunction from the rowHeaderClick event of this sap.m.PlanningCalendar.

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

detachRowSelectionChange

Detaches event handler fnFunction from the rowSelectionChange event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar.

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

detachViewChange

Detaches event handler fnFunction from the viewChange event of this sap.m.PlanningCalendar.

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

sap.m.PlanningCalendar.extend

Creates a new subclass of class sap.m.PlanningCalendar 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.

fireAppointmentSelect

Fires event appointmentSelect to attached listeners.

fireIntervalSelect

Fires event intervalSelect to attached listeners.

fireRowHeaderClick

Fires event rowHeaderClick to attached listeners.

fireRowSelectionChange

Fires event rowSelectionChange to attached listeners.

fireStartDateChange

Fires event startDateChange to attached listeners.

fireViewChange

Fires event viewChange to attached listeners.

getAppointmentHeight

Gets current value of property appointmentHeight.

Determines the different possible sizes for appointments.

Default value is Regular.

getAppointmentRoundWidth

Gets current value of property appointmentRoundWidth.

Defines rounding of the width 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.

getAppointmentsReducedHeight

Gets current value of property appointmentsReducedHeight.

Determines whether the appointments that have only title without text are rendered with smaller height.

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

Default value is false.

getAppointmentsVisualization

Gets current value of property appointmentsVisualization.

Determines how the appointments are visualized depending 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.

getBuiltInViews

Gets current value of property builtInViews.

Defines the list of predefined views as an array. The views should be specified by their keys.

The default predefined views and their keys are available at sap.m.PlanningCalendarBuiltInView.

Note: If set, all specified views will be displayed along with any custom views (if available). If not set and no custom views are available, all default views will be displayed. If not set and there are any custom views available, only the custom views will be displayed.

Default value is [].

getCustomAppointmentsSorterCallback

Getter for custom appointments sorter (if any).

getEndDate

Getter for the end point in time of the shown interval

getFirstDayOfWeek

Gets current value of property firstDayOfWeek.

If set, the first day of the displayed week is this day. Valid values are 0 to 6 starting on Sunday. If there is no valid value set, the default of the used locale is used.

Note: this property will only have effect in the weekly – based views of the PlanningCalendar – Week view, and OneMonth view (on small devices).

Default value is -1.

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.

Specifies the height of the PlanningCalendar. Note: If the set height is less than the displayed content, it will not be applied

getLegend

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

getMaxDate

Gets current value of property maxDate.

Defines the maximum date that can be displayed and selected in the PlanningCalendar. This must be a JavaScript date object.

Note: If the maxDate is set to be before the current minDate, the minDate is set to the first date of the month in which the maxDate belongs.

sap.m.PlanningCalendar.getMetadata

Returns a metadata object for class sap.m.PlanningCalendar.

getMinDate

Gets current value of property minDate.

Defines the minimum date that can be displayed and selected in the PlanningCalendar. This must be a JavaScript date object.

Note: If the minDate is set to be after the current maxDate, the maxDate is set to the last date of the month in which the minDate belongs.

getNoDataText

Gets current value of property noDataText.

Defines the text that is displayed when no PlanningCalendarRows are assigned.

getRows

Gets content of aggregation rows.

Rows of the PlanningCalendar.

getSelectedAppointments

Holds the selected appointments. If no appointments are selected, an empty array is returned.

getSelectedRows

Returns an array containing the selected rows. If no row is selected, an empty array is returned.

getShowDayNamesLine

Gets current value of property showDayNamesLine.

Determines whether the day names are displayed in a separate line or inside the single days.

Default value is false.

getShowEmptyIntervalHeaders

Gets current value of property showEmptyIntervalHeaders.

Determines whether the space (at the top of the intervals), where the assigned interval headers appear, should remain visible even when no interval headers are present in the visible time frame. If set to false, this space would collapse/disappear when no interval headers are assigned.

Note: This property takes effect, only if showIntervalHeaders is also set to true.

Default value is true.

getShowIntervalHeaders

Gets current value of property showIntervalHeaders.

Determines whether the assigned interval headers are displayed. You can assign them using the intervalHeaders aggregation of the PlanningCalendarRow.

Note: If you set both showIntervalHeaders and showEmptyIntervalHeaders properties to true, the space (at the top of the intervals) where the assigned interval headers appear, will remain visible even if no interval headers are assigned.

Default value is true.

getShowRowHeaders

Gets current value of property showRowHeaders.

Determines whether the column containing the headers of the PlanningCalendarRows is displayed.

Default value is true.

getShowWeekNumbers

Gets current value of property showWeekNumbers.

Determines if the week numbers are displayed.

Default value is false.

getSingleSelection

Gets current value of property singleSelection.

Determines whether only a single row can be selected.

Default value is true.

getSpecialDates

Gets content of aggregation specialDates.

Special days in the header calendar visualized as date range with a type.

Note: If one day is assigned to more than one type, only the first type will be used.

getStartDate

Gets current value of property startDate.

Determines the start date of the row, as a JavaScript date object. The current date is used as default.

getStickyHeader

Gets current value of property stickyHeader.

Determines whether the header area will remain visible (fixed on top) when the rest of the content is scrolled out of view.

The sticky header behavior is automatically disabled on phones in landscape mode for better visibility of the content.

Note: There is limited browser support, hence the API is in experimental state. Browsers that currently support this feature are Chrome (desktop and mobile), Safari (desktop and mobile) and Edge 41.

There are also some known issues with respect to the scrolling behavior and focus handling. A few are given below:

When the PlanningCalendar is placed in certain layout containers, for example the GridLayout control, the column headers do not fix at the top of the viewport. Similar behavior is also observed with the ObjectPage control.

This API should not be used in production environment.

Note: The stickyHeader of the PlanningCalendar uses the sticky property of sap.m.Table. Therefore, all features and restrictions of the property in sap.m.Table apply to the PlanningCalendar as well.

Default value is false.

getToolbarContent

Gets content of aggregation toolbarContent.

The content of the toolbar.

getViewKey

Gets current value of property viewKey.

Defines the key of the PlanningCalendarView used for the output.

Note: The default value is set Hour. If you are using your own views, the keys of these views should be used instead.

Default value is CalendarIntervalType.Hour.

getViews

Gets content of aggregation views.

Views of the PlanningCalendar.

Note: If not set, all the default views are available. Their keys are defined in sap.ui.unified.CalendarIntervalType.

getVisibleIntervalsCount

Getter for how many intervals are currently displayed

getWidth

Gets current value of property width.

Specifies the width of the PlanningCalendar.

indexOfRow

Checks for the provided sap.m.PlanningCalendarRow in the aggregation rows. and returns its index if found or -1 otherwise.

indexOfSpecialDate

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

indexOfToolbarContent

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

indexOfView

Checks for the provided sap.m.PlanningCalendarView in the aggregation views. and returns its index if found or -1 otherwise.

insertRow

Inserts a row into the aggregation rows.

insertSpecialDate

Inserts a specialDate into the aggregation specialDates.

insertToolbarContent

Inserts a toolbarContent into the aggregation toolbarContent.

insertView

Inserts a view into the aggregation views.

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllRows

Removes all the controls from the aggregation rows.

Additionally, it unregisters them from the hosting UIArea.

removeAllSpecialDates

Removes all the controls from the aggregation specialDates.

Additionally, it unregisters them from the hosting UIArea.

removeAllToolbarContent

Removes all the controls from the aggregation toolbarContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllViews

Removes all the controls from the aggregation views.

Additionally, it unregisters them from the hosting UIArea.

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

removeRow

Removes a row from the aggregation rows.

removeSpecialDate

Removes a specialDate from the aggregation specialDates.

removeToolbarContent

Removes a toolbarContent from the aggregation toolbarContent.

removeView

Removes a view from the aggregation views.

selectAllRows

Selects or deselects all PlanningCalendarRows.

Note: Selection only works if singleSelection is set to false.

setAppointmentHeight

Sets a new value for property appointmentHeight.

Determines the different possible sizes for appointments.

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 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.

Determines whether the appointments that have only title without text are rendered with smaller height.

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

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

Default value is false.

setAppointmentsVisualization

Sets a new value for property appointmentsVisualization.

Determines how the appointments are visualized depending 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.

setBuiltInViews

Sets a new value for property builtInViews.

Defines the list of predefined views as an array. The views should be specified by their keys.

The default predefined views and their keys are available at sap.m.PlanningCalendarBuiltInView.

Note: If set, all specified views will be displayed along with any custom views (if available). If not set and no custom views are available, all default views will be displayed. If not set and there are any custom views available, only the custom views will be displayed.

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

Default value is [].

setCustomAppointmentsSorterCallback

Setter for custom sorting of appointments. If not used, the appointments will be sorted according to their duration vertically. For example, the start time and order to the X axis won't change.

setFirstDayOfWeek

Sets a new value for property firstDayOfWeek.

If set, the first day of the displayed week is this day. Valid values are 0 to 6 starting on Sunday. If there is no valid value set, the default of the used locale is used.

Note: this property will only have effect in the weekly – based views of the PlanningCalendar – Week view, and OneMonth view (on small devices).

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

Default value is -1.

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.

Specifies the height of the PlanningCalendar. Note: If the set height is less than the displayed content, it will not be applied

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

setLegend

Sets the associated legend.

setMaxDate

Sets a new value for property maxDate.

Defines the maximum date that can be displayed and selected in the PlanningCalendar. This must be a JavaScript date object.

Note: If the maxDate is set to be before the current minDate, the minDate is set to the first date of the month in which the maxDate belongs.

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

setMinDate

Sets a new value for property minDate.

Defines the minimum date that can be displayed and selected in the PlanningCalendar. This must be a JavaScript date object.

Note: If the minDate is set to be after the current maxDate, the maxDate is set to the last date of the month in which the minDate belongs.

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

setNoDataText

Sets a new value for property noDataText.

Defines the text that is displayed when no PlanningCalendarRows are assigned.

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

setShowDayNamesLine

Sets a new value for property showDayNamesLine.

Determines whether the day names are displayed in a separate line or inside the single days.

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

Default value is false.

setShowEmptyIntervalHeaders

Sets a new value for property showEmptyIntervalHeaders.

Determines whether the space (at the top of the intervals), where the assigned interval headers appear, should remain visible even when no interval headers are present in the visible time frame. If set to false, this space would collapse/disappear when no interval headers are assigned.

Note: This property takes effect, only if showIntervalHeaders is also 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.

Determines whether the assigned interval headers are displayed. You can assign them using the intervalHeaders aggregation of the PlanningCalendarRow.

Note: If you set both showIntervalHeaders and showEmptyIntervalHeaders properties to true, the space (at the top of the intervals) where the assigned interval headers appear, will remain visible even if no interval headers are assigned.

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

Default value is true.

setShowRowHeaders

Sets a new value for property showRowHeaders.

Determines whether the column containing the headers of the PlanningCalendarRows is displayed.

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

Default value is true.

setShowWeekNumbers

Sets a new value for property showWeekNumbers.

Determines if the week numbers are displayed.

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

Default value is false.

setSingleSelection

Sets a new value for property singleSelection.

Determines whether only a single row can be selected.

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

Default value is true.

setStartDate

Sets the given date as start date. The current date is used as default. Depending on the current view the start date may be adjusted (for example, the week view shows always the first weekday of the same week as the given date).

setStickyHeader

Sets the stickyHeader property.

setViewKey

Sets a new value for property viewKey.

Defines the key of the PlanningCalendarView used for the output.

Note: The default value is set Hour. If you are using your own views, the keys of these views should be used instead.

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

Default value is CalendarIntervalType.Hour.

setWidth

Sets the width property and ensures that the start date is in sync with each row timeline.

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

addRow

Adds some row to the aggregation rows.

Param Type DefaultValue Description
oRow sap.m.PlanningCalendarRow

The row to add; if empty, nothing is inserted

addSpecialDate

Adds some specialDate to the aggregation specialDates.

Param Type DefaultValue Description
oSpecialDate sap.ui.unified.DateTypeRange

The specialDate to add; if empty, nothing is inserted

addToolbarContent

Adds some toolbarContent to the aggregation toolbarContent.

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

The toolbarContent to add; if empty, nothing is inserted

addView

Adds some view to the aggregation views.

Param Type DefaultValue Description
oView sap.m.PlanningCalendarView

The view to add; if empty, nothing is inserted

attachAppointmentSelect

Attaches event handler fnFunction to the appointmentSelect event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fired if an appointment is 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.m.PlanningCalendar itself

attachIntervalSelect

Attaches event handler fnFunction to the intervalSelect event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fired if an interval was selected in the calendar header or in the row.

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.m.PlanningCalendar itself

attachRowHeaderClick

Attaches event handler fnFunction to the rowHeaderClick event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fires when a row header is clicked.

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.m.PlanningCalendar itself

attachRowSelectionChange

Attaches event handler fnFunction to the rowSelectionChange event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fires when row selection is changed.

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.m.PlanningCalendar itself

attachStartDateChange

Attaches event handler fnFunction to the startDateChange event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fired when the startDate property was changed while navigating in the PlanningCalendar. The new value can be obtained using the sap.m.PlanningCalendar#getStartDate() method. Note: This event is fired in case when the viewKey property is changed, and as a result of which the view requires a change in the startDate property.

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.m.PlanningCalendar itself

attachViewChange

Attaches event handler fnFunction to the viewChange event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar itself.

Fired when the viewKey property was changed by user interaction.

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.m.PlanningCalendar itself

destroyRows

Destroys all the rows in the aggregation rows.

destroySpecialDates

Destroys all the specialDates in the aggregation specialDates.

destroyToolbarContent

Destroys all the toolbarContent in the aggregation toolbarContent.

destroyViews

Destroys all the views in the aggregation views.

detachAppointmentSelect

Detaches event handler fnFunction from the appointmentSelect event of this sap.m.PlanningCalendar.

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

detachIntervalSelect

Detaches event handler fnFunction from the intervalSelect event of this sap.m.PlanningCalendar.

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

detachRowHeaderClick

Detaches event handler fnFunction from the rowHeaderClick event of this sap.m.PlanningCalendar.

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

detachRowSelectionChange

Detaches event handler fnFunction from the rowSelectionChange event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar.

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

detachViewChange

Detaches event handler fnFunction from the viewChange event of this sap.m.PlanningCalendar.

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.m.PlanningCalendar.extend

Creates a new subclass of class sap.m.PlanningCalendar 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

fireAppointmentSelect

Fires event appointmentSelect to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

appointment sap.ui.unified.CalendarAppointment

The selected appointment.

appointments sap.ui.unified.CalendarAppointment[]

The selected appointments in case a group appointment is selected.

multiSelect boolean

If set, the appointment was selected using multiple selection (e.g. Shift + single mouse click), meaning more than the current appointment could be selected.

domRefId string

Gives the ID of the DOM element of the clicked appointment

fireIntervalSelect

Fires event intervalSelect to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

startDate object

Start date of the selected interval, as a JavaScript date object.

endDate object

Interval end date as a JavaScript date object.

subInterval boolean

If set, the selected interval is a subinterval.

row sap.m.PlanningCalendarRow

Row of the selected interval.

fireRowHeaderClick

Fires event rowHeaderClick to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

headerId string

The ID of the PlanningCalendarRowHeader of the selected appointment.

Note: Intended to be used as an easy way to get an ID of a PlanningCalendarRowHeader. Do NOT use for modification.

row sap.m.PlanningCalendarRow

The row user clicked on.

fireRowSelectionChange

Fires event rowSelectionChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

rows sap.m.PlanningCalendarRow[]

Array of rows whose selection has changed.

fireStartDateChange

Fires event startDateChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireViewChange

Fires event viewChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getAppointmentHeight

Gets current value of property appointmentHeight.

Determines the different possible sizes for appointments.

Default value is Regular.

getAppointmentRoundWidth

Gets current value of property appointmentRoundWidth.

Defines rounding of the width 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.

getAppointmentsReducedHeight

Gets current value of property appointmentsReducedHeight.

Determines whether the appointments that have only title without text are rendered with smaller height.

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

Default value is false.

getAppointmentsVisualization

Gets current value of property appointmentsVisualization.

Determines how the appointments are visualized depending 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.

getBuiltInViews

Gets current value of property builtInViews.

Defines the list of predefined views as an array. The views should be specified by their keys.

The default predefined views and their keys are available at sap.m.PlanningCalendarBuiltInView.

Note: If set, all specified views will be displayed along with any custom views (if available). If not set and no custom views are available, all default views will be displayed. If not set and there are any custom views available, only the custom views will be displayed.

Default value is [].

getCustomAppointmentsSorterCallback

Getter for custom appointments sorter (if any).

getEndDate

Getter for the end point in time of the shown interval

getFirstDayOfWeek

Gets current value of property firstDayOfWeek.

If set, the first day of the displayed week is this day. Valid values are 0 to 6 starting on Sunday. If there is no valid value set, the default of the used locale is used.

Note: this property will only have effect in the weekly – based views of the PlanningCalendar – Week view, and OneMonth view (on small devices).

Default value is -1.

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.

Specifies the height of the PlanningCalendar. Note: If the set height is less than the displayed content, it will not be applied

getLegend

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

getMaxDate

Gets current value of property maxDate.

Defines the maximum date that can be displayed and selected in the PlanningCalendar. This must be a JavaScript date object.

Note: If the maxDate is set to be before the current minDate, the minDate is set to the first date of the month in which the maxDate belongs.

sap.m.PlanningCalendar.getMetadata

Returns a metadata object for class sap.m.PlanningCalendar.

getMinDate

Gets current value of property minDate.

Defines the minimum date that can be displayed and selected in the PlanningCalendar. This must be a JavaScript date object.

Note: If the minDate is set to be after the current maxDate, the maxDate is set to the last date of the month in which the minDate belongs.

getNoDataText

Gets current value of property noDataText.

Defines the text that is displayed when no PlanningCalendarRows are assigned.

getRows

Gets content of aggregation rows.

Rows of the PlanningCalendar.

getSelectedAppointments

Holds the selected appointments. If no appointments are selected, an empty array is returned.

getSelectedRows

Returns an array containing the selected rows. If no row is selected, an empty array is returned.

getShowDayNamesLine

Gets current value of property showDayNamesLine.

Determines whether the day names are displayed in a separate line or inside the single days.

Default value is false.

getShowEmptyIntervalHeaders

Gets current value of property showEmptyIntervalHeaders.

Determines whether the space (at the top of the intervals), where the assigned interval headers appear, should remain visible even when no interval headers are present in the visible time frame. If set to false, this space would collapse/disappear when no interval headers are assigned.

Note: This property takes effect, only if showIntervalHeaders is also set to true.

Default value is true.

getShowIntervalHeaders

Gets current value of property showIntervalHeaders.

Determines whether the assigned interval headers are displayed. You can assign them using the intervalHeaders aggregation of the PlanningCalendarRow.

Note: If you set both showIntervalHeaders and showEmptyIntervalHeaders properties to true, the space (at the top of the intervals) where the assigned interval headers appear, will remain visible even if no interval headers are assigned.

Default value is true.

getShowRowHeaders

Gets current value of property showRowHeaders.

Determines whether the column containing the headers of the PlanningCalendarRows is displayed.

Default value is true.

getShowWeekNumbers

Gets current value of property showWeekNumbers.

Determines if the week numbers are displayed.

Default value is false.

getSingleSelection

Gets current value of property singleSelection.

Determines whether only a single row can be selected.

Default value is true.

getSpecialDates

Gets content of aggregation specialDates.

Special days in the header calendar visualized as date range with a type.

Note: If one day is assigned to more than one type, only the first type will be used.

getStartDate

Gets current value of property startDate.

Determines the start date of the row, as a JavaScript date object. The current date is used as default.

getStickyHeader

Gets current value of property stickyHeader.

Determines whether the header area will remain visible (fixed on top) when the rest of the content is scrolled out of view.

The sticky header behavior is automatically disabled on phones in landscape mode for better visibility of the content.

Note: There is limited browser support, hence the API is in experimental state. Browsers that currently support this feature are Chrome (desktop and mobile), Safari (desktop and mobile) and Edge 41.

There are also some known issues with respect to the scrolling behavior and focus handling. A few are given below:

When the PlanningCalendar is placed in certain layout containers, for example the GridLayout control, the column headers do not fix at the top of the viewport. Similar behavior is also observed with the ObjectPage control.

This API should not be used in production environment.

Note: The stickyHeader of the PlanningCalendar uses the sticky property of sap.m.Table. Therefore, all features and restrictions of the property in sap.m.Table apply to the PlanningCalendar as well.

Default value is false.

getToolbarContent

Gets content of aggregation toolbarContent.

The content of the toolbar.

getViewKey

Gets current value of property viewKey.

Defines the key of the PlanningCalendarView used for the output.

Note: The default value is set Hour. If you are using your own views, the keys of these views should be used instead.

Default value is CalendarIntervalType.Hour.

getViews

Gets content of aggregation views.

Views of the PlanningCalendar.

Note: If not set, all the default views are available. Their keys are defined in sap.ui.unified.CalendarIntervalType.

getVisibleIntervalsCount

Getter for how many intervals are currently displayed

getWidth

Gets current value of property width.

Specifies the width of the PlanningCalendar.

indexOfRow

Checks for the provided sap.m.PlanningCalendarRow in the aggregation rows. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oRow sap.m.PlanningCalendarRow

The row whose index is looked for

indexOfSpecialDate

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

Param Type DefaultValue Description
oSpecialDate sap.ui.unified.DateTypeRange

The specialDate whose index is looked for

indexOfToolbarContent

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

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

The toolbarContent whose index is looked for

indexOfView

Checks for the provided sap.m.PlanningCalendarView in the aggregation views. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oView sap.m.PlanningCalendarView

The view whose index is looked for

insertRow

Inserts a row into the aggregation rows.

Param Type DefaultValue Description
oRow sap.m.PlanningCalendarRow

The row to insert; if empty, nothing is inserted

iIndex int

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

insertSpecialDate

Inserts a specialDate into the aggregation specialDates.

Param Type DefaultValue Description
oSpecialDate sap.ui.unified.DateTypeRange

The specialDate to insert; if empty, nothing is inserted

iIndex int

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

insertToolbarContent

Inserts a toolbarContent into the aggregation toolbarContent.

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

The toolbarContent to insert; if empty, nothing is inserted

iIndex int

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

insertView

Inserts a view into the aggregation views.

Param Type DefaultValue Description
oView sap.m.PlanningCalendarView

The view to insert; if empty, nothing is inserted

iIndex int

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

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllRows

Removes all the controls from the aggregation rows.

Additionally, it unregisters them from the hosting UIArea.

removeAllSpecialDates

Removes all the controls from the aggregation specialDates.

Additionally, it unregisters them from the hosting UIArea.

removeAllToolbarContent

Removes all the controls from the aggregation toolbarContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllViews

Removes all the controls from the aggregation views.

Additionally, it unregisters them from the hosting UIArea.

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

removeRow

Removes a row from the aggregation rows.

Param Type DefaultValue Description
vRow int string sap.m.PlanningCalendarRow

The row to remove or its index or id

removeSpecialDate

Removes a specialDate from the aggregation specialDates.

Param Type DefaultValue Description
vSpecialDate int string sap.ui.unified.DateTypeRange

The specialDate to remove or its index or id

removeToolbarContent

Removes a toolbarContent from the aggregation toolbarContent.

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

The toolbarContent to remove or its index or id

removeView

Removes a view from the aggregation views.

Param Type DefaultValue Description
vView int string sap.m.PlanningCalendarView

The view to remove or its index or id

selectAllRows

Selects or deselects all PlanningCalendarRows.

Note: Selection only works if singleSelection is set to false.

Param Type DefaultValue Description
bSelect boolean

Indicator showing whether PlanningCalendarRows should be selected or deselected

setAppointmentHeight

Sets a new value for property appointmentHeight.

Determines the different possible sizes for appointments.

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 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.

Determines whether the appointments that have only title without text are rendered with smaller height.

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

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

New value for property appointmentsReducedHeight

setAppointmentsVisualization

Sets a new value for property appointmentsVisualization.

Determines how the appointments are visualized depending 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

setBuiltInViews

Sets a new value for property builtInViews.

Defines the list of predefined views as an array. The views should be specified by their keys.

The default predefined views and their keys are available at sap.m.PlanningCalendarBuiltInView.

Note: If set, all specified views will be displayed along with any custom views (if available). If not set and no custom views are available, all default views will be displayed. If not set and there are any custom views available, only the custom views will be displayed.

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

Default value is [].

Param Type DefaultValue Description
sBuiltInViews string[] []

New value for property builtInViews

setCustomAppointmentsSorterCallback

Setter for custom sorting of appointments. If not used, the appointments will be sorted according to their duration vertically. For example, the start time and order to the X axis won't change.

Param Type DefaultValue Description
fnSorter sap.m.PlanningCalendar.appointmentsSorterCallback

setFirstDayOfWeek

Sets a new value for property firstDayOfWeek.

If set, the first day of the displayed week is this day. Valid values are 0 to 6 starting on Sunday. If there is no valid value set, the default of the used locale is used.

Note: this property will only have effect in the weekly – based views of the PlanningCalendar – Week view, and OneMonth view (on small devices).

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
iFirstDayOfWeek int -1

New value for property firstDayOfWeek

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.

Specifies the height of the PlanningCalendar. Note: If the set height is less than the displayed content, it will not be applied

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

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

setMaxDate

Sets a new value for property maxDate.

Defines the maximum date that can be displayed and selected in the PlanningCalendar. This must be a JavaScript date object.

Note: If the maxDate is set to be before the current minDate, the minDate is set to the first date of the month in which the maxDate belongs.

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

Param Type DefaultValue Description
oMaxDate object

New value for property maxDate

setMinDate

Sets a new value for property minDate.

Defines the minimum date that can be displayed and selected in the PlanningCalendar. This must be a JavaScript date object.

Note: If the minDate is set to be after the current maxDate, the maxDate is set to the last date of the month in which the minDate belongs.

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

Param Type DefaultValue Description
oMinDate object

New value for property minDate

setNoDataText

Sets a new value for property noDataText.

Defines the text that is displayed when no PlanningCalendarRows are assigned.

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

Param Type DefaultValue Description
sNoDataText string

New value for property noDataText

setShowDayNamesLine

Sets a new value for property showDayNamesLine.

Determines whether the day names are displayed in a separate line or inside the single days.

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

New value for property showDayNamesLine

setShowEmptyIntervalHeaders

Sets a new value for property showEmptyIntervalHeaders.

Determines whether the space (at the top of the intervals), where the assigned interval headers appear, should remain visible even when no interval headers are present in the visible time frame. If set to false, this space would collapse/disappear when no interval headers are assigned.

Note: This property takes effect, only if showIntervalHeaders is also 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.

Determines whether the assigned interval headers are displayed. You can assign them using the intervalHeaders aggregation of the PlanningCalendarRow.

Note: If you set both showIntervalHeaders and showEmptyIntervalHeaders properties to true, the space (at the top of the intervals) where the assigned interval headers appear, will remain visible even if no interval headers 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

setShowRowHeaders

Sets a new value for property showRowHeaders.

Determines whether the column containing the headers of the PlanningCalendarRows is displayed.

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
bShowRowHeaders boolean true

New value for property showRowHeaders

setShowWeekNumbers

Sets a new value for property showWeekNumbers.

Determines if the week numbers are displayed.

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

New value for property showWeekNumbers

setSingleSelection

Sets a new value for property singleSelection.

Determines whether only a single row can be selected.

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
bSingleSelection boolean true

New value for property singleSelection

setStartDate

Sets the given date as start date. The current date is used as default. Depending on the current view the start date may be adjusted (for example, the week view shows always the first weekday of the same week as the given date).

Param Type DefaultValue Description
oDate Date

the date to set as sap.m.PlanningCalendar startDate. May be changed(adjusted) if property startDate is adjusted. See remark about week view above.

setStickyHeader

Sets the stickyHeader property.

Param Type DefaultValue Description
bStick boolean

Whether the header area will remain visible (fixed on top)

setViewKey

Sets a new value for property viewKey.

Defines the key of the PlanningCalendarView used for the output.

Note: The default value is set Hour. If you are using your own views, the keys of these views should be used instead.

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

Default value is CalendarIntervalType.Hour.

Param Type DefaultValue Description
sViewKey string CalendarIntervalType.Hour

New value for property viewKey

setWidth

Sets the width property and ensures that the start date is in sync with each row timeline.

Param Type DefaultValue Description
sWidth undefined

the width to be set to the PlanningCalendar