Class sap.m.PlanningCalendarModule: sap/m/PlanningCalendar

extends Control

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

Usage

The PlanningCalendar has the following structure from top to bottom:

  • A toolbar where you can add your own buttons or other controls using the toolbarContent aggregation.
  • A header containing a drop-down menu for selecting the PlanningCalendarViews, and navigation for moving through the intervals using arrows or selecting a specific interval with a picker. Custom views can be configured using the views aggregation. If not configured, the following set of default built-in views is available - Hours, Days, 1 Week, 1 Month, and Months. Setting a custom view(s) replaces the built-in ones.
  • The rows of the PlanningCalendar that contain the assigned appointments. They can be configured with the rows aggregation, which is of type PlanningCalendarRow.

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.


Since: 1.34.
Constructor Summary
new sap.m.PlanningCalendar(sID?, mSettings?)Constructor for a new PlanningCalendar.
Event Summary
appointmentSelect(oControlEvent)Fired if an appointment is selected.
intervalSelect(oControlEvent)Fired if an interval was selected in the calendar header or in the row.
rowHeaderClick(oControlEvent)Fires when a row header is clicked.
rowSelectionChange(oControlEvent)Fires when row selection is changed.
startDateChange(oControlEvent)startDate was changed while navigating in the PlanningCalendar.
viewChange(oControlEvent)viewKey was changed by user interaction.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.PlanningCalendar.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.PlanningCalendar with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.PlanningCalendar.getMetadata()Returns a metadata object for class sap.m.PlanningCalendar.
addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy.
addRow(oRow)Adds some row to the aggregation rows.
addSpecialDate(oSpecialDate)Adds some specialDate to the aggregation specialDates.
addToolbarContent(oToolbarContent)Adds some toolbarContent to the aggregation toolbarContent.
addView(oView)Adds some view to the aggregation views.
attachAppointmentSelect(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the appointmentSelect event of this sap.m.PlanningCalendar.
attachIntervalSelect(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the intervalSelect event of this sap.m.PlanningCalendar.
attachRowHeaderClick(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the rowHeaderClick event of this sap.m.PlanningCalendar.
attachRowSelectionChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the rowSelectionChange event of this sap.m.PlanningCalendar.
attachStartDateChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the startDateChange event of this sap.m.PlanningCalendar.
attachViewChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the viewChange event of this sap.m.PlanningCalendar.
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(fnFunction, oListener)Detaches event handler fnFunction from the appointmentSelect event of this sap.m.PlanningCalendar.
detachIntervalSelect(fnFunction, oListener)Detaches event handler fnFunction from the intervalSelect event of this sap.m.PlanningCalendar.
detachRowHeaderClick(fnFunction, oListener)Detaches event handler fnFunction from the rowHeaderClick event of this sap.m.PlanningCalendar.
detachRowSelectionChange(fnFunction, oListener)Detaches event handler fnFunction from the rowSelectionChange event of this sap.m.PlanningCalendar.
detachStartDateChange(fnFunction, oListener)Detaches event handler fnFunction from the startDateChange event of this sap.m.PlanningCalendar.
detachViewChange(fnFunction, oListener)Detaches event handler fnFunction from the viewChange event of this sap.m.PlanningCalendar.
fireAppointmentSelect(mParameters?)Fires event appointmentSelect to attached listeners.
fireIntervalSelect(mParameters?)Fires event intervalSelect to attached listeners.
fireRowHeaderClick(mParameters?)Fires event rowHeaderClick to attached listeners.
fireRowSelectionChange(mParameters?)Fires event rowSelectionChange to attached listeners.
fireStartDateChange(mParameters?)Fires event startDateChange to attached listeners.
fireViewChange(mParameters?)Fires event viewChange to attached listeners.
getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
getBuiltInViews()Gets current value of property builtInViews.
getGroupAppointmentsMode()Gets current value of property groupAppointmentsMode.
getHeight()Gets current value of property height.
getLegend()ID of the element which is the current target of the association legend, or null.
getMaxDate()Gets current value of property maxDate.
getMinDate()Gets current value of property minDate.
getNoDataText()Gets current value of property noDataText.
getRows()Gets content of aggregation rows.
getSelectedRows()Returns an array containing the selected rows.
getShowDayNamesLine()Gets current value of property showDayNamesLine.
getShowEmptyIntervalHeaders()Gets current value of property showEmptyIntervalHeaders.
getShowIntervalHeaders()Gets current value of property showIntervalHeaders.
getShowRowHeaders()Gets current value of property showRowHeaders.
getSingleSelection()Gets current value of property singleSelection.
getSpecialDates()Gets content of aggregation specialDates.
getStartDate()Gets current value of property startDate.
getToolbarContent()Gets content of aggregation toolbarContent.
getViewKey()Gets current value of property viewKey.
getViews()Gets content of aggregation views.
getWidth()Gets current value of property width.
indexOfRow(oRow)Checks for the provided sap.m.PlanningCalendarRow in the aggregation rows.
indexOfSpecialDate(oSpecialDate)Checks for the provided sap.ui.unified.DateTypeRange in the aggregation specialDates.
indexOfToolbarContent(oToolbarContent)Checks for the provided sap.ui.core.Control in the aggregation toolbarContent.
indexOfView(oView)Checks for the provided sap.m.PlanningCalendarView in the aggregation views.
insertRow(oRow, iIndex)Inserts a row into the aggregation rows.
insertSpecialDate(oSpecialDate, iIndex)Inserts a specialDate into the aggregation specialDates.
insertToolbarContent(oToolbarContent, iIndex)Inserts a toolbarContent into the aggregation toolbarContent.
insertView(oView, iIndex)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.
removeAllSpecialDates()Removes all the controls from the aggregation specialDates.
removeAllToolbarContent()Removes all the controls from the aggregation toolbarContent.
removeAllViews()Removes all the controls from the aggregation views.
removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy.
removeRow(vRow)Removes a row from the aggregation rows.
removeSpecialDate(vSpecialDate)Removes a specialDate from the aggregation specialDates.
removeToolbarContent(vToolbarContent)Removes a toolbarContent from the aggregation toolbarContent.
removeView(vView)Removes a view from the aggregation views.
selectAllRows(bSelect)Selects or deselects all PlanningCalendarRows.
setAppointmentsReducedHeight(bAppointmentsReducedHeight)Sets a new value for property appointmentsReducedHeight.
setAppointmentsVisualization(sAppointmentsVisualization)Sets a new value for property appointmentsVisualization.
setBuiltInViews(sBuiltInViews)Sets a new value for property builtInViews.
setGroupAppointmentsMode(sGroupAppointmentsMode)Sets a new value for property groupAppointmentsMode.
setHeight(sHeight)Sets a new value for property height.
setLegend(oLegend)Sets the associated legend.
setMaxDate(oMaxDate)Sets a new value for property maxDate.
setMinDate(oMinDate)Sets a new value for property minDate.
setNoDataText(sNoDataText)Sets a new value for property noDataText.
setShowDayNamesLine(bShowDayNamesLine)Sets a new value for property showDayNamesLine.
setShowEmptyIntervalHeaders(bShowEmptyIntervalHeaders)Sets a new value for property showEmptyIntervalHeaders.
setShowIntervalHeaders(bShowIntervalHeaders)Sets a new value for property showIntervalHeaders.
setShowRowHeaders(bShowRowHeaders)Sets a new value for property showRowHeaders.
setSingleSelection(bSingleSelection)Sets a new value for property singleSelection.
setStartDate(oStartDate)Sets the given date as start date.
setViewKey(sViewKey)Sets a new value for property viewKey.
setWidth(sWidth)Sets a new value for property width.
Constructor Detail
new sap.m.PlanningCalendar(sID?, mSettings?)

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 for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
stringsID?ID for the new control, generated automatically if no ID is given
objectmSettings?Initial settings for the new control
Event Detail
appointmentSelect(oControlEvent)
Fired if an appointment is selected.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.ui.unified.CalendarAppointmentoControlEvent.getParameters.appointmentThe selected appointment.
sap.ui.unified.CalendarAppointment[]oControlEvent.getParameters.appointmentsThe selected appointments in case a group appointment is selected.
booleanoControlEvent.getParameters.multiSelectIf set, the appointment was selected using multiple selection (e.g. Shift + single mouse click), meaning more than the current appointment could be selected.
stringoControlEvent.getParameters.domRefIdGives the ID of the DOM element of the clicked appointment
intervalSelect(oControlEvent)
Fired if an interval was selected in the calendar header or in the row.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
objectoControlEvent.getParameters.startDateStart date of the selected interval, as a JavaScript date object.
objectoControlEvent.getParameters.endDateInterval end date as a JavaScript date object.
booleanoControlEvent.getParameters.subIntervalIf set, the selected interval is a subinterval.
sap.m.PlanningCalendarRowoControlEvent.getParameters.rowRow of the selected interval.
rowHeaderClick(oControlEvent)
Fires when a row header is clicked.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
Since:
1.46.0
rowSelectionChange(oControlEvent)
Fires when row selection is changed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.m.PlanningCalendarRow[]oControlEvent.getParameters.rowsArray of rows whose selection has changed.
startDateChange(oControlEvent)
startDate was changed while navigating in the PlanningCalendar. The new value can be obtained using the sap.m.PlanningCalendar#getStartDate() method.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
viewChange(oControlEvent)
viewKey was changed by user interaction.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
Method Detail
sap.m.PlanningCalendar.extend(sClassName, oClassInfo?, FNMetaImpl?): function

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.

Parameters:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.m.PlanningCalendar.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.PlanningCalendar.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addAriaLabelledBy(vAriaLabelledBy): sap.m.PlanningCalendar
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledBythe ariaLabelledBy to add; if empty, nothing is inserted
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.40.0
addRow(oRow): sap.m.PlanningCalendar
Adds some row to the aggregation rows.
Parameters:
sap.m.PlanningCalendarRowoRowthe row to add; if empty, nothing is inserted
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
addSpecialDate(oSpecialDate): sap.m.PlanningCalendar
Adds some specialDate to the aggregation specialDates.
Parameters:
sap.ui.unified.DateTypeRangeoSpecialDatethe specialDate to add; if empty, nothing is inserted
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
addToolbarContent(oToolbarContent): sap.m.PlanningCalendar
Adds some toolbarContent to the aggregation toolbarContent.
Parameters:
sap.ui.core.ControloToolbarContentthe toolbarContent to add; if empty, nothing is inserted
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
addView(oView): sap.m.PlanningCalendar
Adds some view to the aggregation views.
Parameters:
sap.m.PlanningCalendarViewoViewthe view to add; if empty, nothing is inserted
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
attachAppointmentSelect(oData?, fnFunction, oListener?): sap.m.PlanningCalendar

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.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.PlanningCalendar itself
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
attachIntervalSelect(oData?, fnFunction, oListener?): sap.m.PlanningCalendar

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.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.PlanningCalendar itself
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
attachRowHeaderClick(oData?, fnFunction, oListener?): sap.m.PlanningCalendar

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.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.PlanningCalendar itself
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.46.0
attachRowSelectionChange(oData?, fnFunction, oListener?): sap.m.PlanningCalendar

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.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.PlanningCalendar itself
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
attachStartDateChange(oData?, fnFunction, oListener?): sap.m.PlanningCalendar

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.

startDate was changed while navigating in the PlanningCalendar. The new value can be obtained using the sap.m.PlanningCalendar#getStartDate() method.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.PlanningCalendar itself
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
attachViewChange(oData?, fnFunction, oListener?): sap.m.PlanningCalendar

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.

viewKey was changed by user interaction.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.PlanningCalendar itself
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
destroyRows(): sap.m.PlanningCalendar
Destroys all the rows in the aggregation rows.
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
destroySpecialDates(): sap.m.PlanningCalendar
Destroys all the specialDates in the aggregation specialDates.
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
destroyToolbarContent(): sap.m.PlanningCalendar
Destroys all the toolbarContent in the aggregation toolbarContent.
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
destroyViews(): sap.m.PlanningCalendar
Destroys all the views in the aggregation views.
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
detachAppointmentSelect(fnFunction, oListener): sap.m.PlanningCalendar

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
detachIntervalSelect(fnFunction, oListener): sap.m.PlanningCalendar

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
detachRowHeaderClick(fnFunction, oListener): sap.m.PlanningCalendar

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.46.0
detachRowSelectionChange(fnFunction, oListener): sap.m.PlanningCalendar

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
detachStartDateChange(fnFunction, oListener): sap.m.PlanningCalendar

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
detachViewChange(fnFunction, oListener): sap.m.PlanningCalendar

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
fireAppointmentSelect(mParameters?): sap.m.PlanningCalendar
Fires event appointmentSelect to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.ui.unified.CalendarAppointmentmParameters.appointment?The selected appointment.
sap.ui.unified.CalendarAppointment[]mParameters.appointments?The selected appointments in case a group appointment is selected.
booleanmParameters.multiSelect?If set, the appointment was selected using multiple selection (e.g. Shift + single mouse click), meaning more than the current appointment could be selected.
stringmParameters.domRefId?Gives the ID of the DOM element of the clicked appointment
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
fireIntervalSelect(mParameters?): sap.m.PlanningCalendar
Fires event intervalSelect to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
objectmParameters.startDate?Start date of the selected interval, as a JavaScript date object.
objectmParameters.endDate?Interval end date as a JavaScript date object.
booleanmParameters.subInterval?If set, the selected interval is a subinterval.
sap.m.PlanningCalendarRowmParameters.row?Row of the selected interval.
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
fireRowHeaderClick(mParameters?): sap.m.PlanningCalendar
Fires event rowHeaderClick to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.46.0
fireRowSelectionChange(mParameters?): sap.m.PlanningCalendar
Fires event rowSelectionChange to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.m.PlanningCalendarRow[]mParameters.rows?Array of rows whose selection has changed.
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
fireStartDateChange(mParameters?): sap.m.PlanningCalendar
Fires event startDateChange to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
fireViewChange(mParameters?): sap.m.PlanningCalendar
Fires event viewChange to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
getAppointmentsReducedHeight(): boolean

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.

Returns:
booleanValue of property appointmentsReducedHeight
Since:
1.38.0
getAppointmentsVisualization(): sap.ui.unified.CalendarAppointmentVisualization

Gets current value of property appointmentsVisualization.

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

Default value is Standard.

Returns:
sap.ui.unified.CalendarAppointmentVisualizationValue of property appointmentsVisualization
Since:
1.40.0
getAriaLabelledBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
sap.ui.core.ID[]
Since:
1.40.0
getBuiltInViews(): string[]

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

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

Returns:
string[]Value of property builtInViews
Since:
1.50
getGroupAppointmentsMode(): sap.ui.unified.GroupAppointmentsMode

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.

Returns:
sap.ui.unified.GroupAppointmentsModeValue of property groupAppointmentsMode
Since:
1.48.0
getHeight(): sap.ui.core.CSSSize

Gets current value of property height.

Specifies the height of the PlanningCalendar.

Returns:
sap.ui.core.CSSSizeValue of property height
getLegend(): sap.ui.core.ID
ID of the element which is the current target of the association legend, or null.
Returns:
sap.ui.core.ID
Since:
1.40.0
getMaxDate(): object

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.

Returns:
objectValue of property maxDate
Since:
1.38.0
getMinDate(): object

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.

Returns:
objectValue of property minDate
Since:
1.38.0
getNoDataText(): string

Gets current value of property noDataText.

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

Returns:
stringValue of property noDataText

Gets content of aggregation rows.

Rows of the PlanningCalendar.

Returns:
sap.m.PlanningCalendarRow[]
getSelectedRows(): sap.m.PlanningCalendarRow[]
Returns an array containing the selected rows. If no row is selected, an empty array is returned.
Returns:
sap.m.PlanningCalendarRow[]selected rows
getShowDayNamesLine(): boolean

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.

Returns:
booleanValue of property showDayNamesLine
Since:
1.50
getShowEmptyIntervalHeaders(): boolean

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.

Returns:
booleanValue of property showEmptyIntervalHeaders
Since:
1.38.0
getShowIntervalHeaders(): boolean

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.

Returns:
booleanValue of property showIntervalHeaders
getShowRowHeaders(): boolean

Gets current value of property showRowHeaders.

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

Default value is true.

Returns:
booleanValue of property showRowHeaders
getSingleSelection(): boolean

Gets current value of property singleSelection.

Determines whether only a single row can be selected.

Default value is true.

Returns:
booleanValue of property singleSelection
getSpecialDates(): sap.ui.unified.DateTypeRange[]

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.

Returns:
sap.ui.unified.DateTypeRange[]
getStartDate(): object

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.

Returns:
objectValue of property startDate
getToolbarContent(): sap.ui.core.Control[]

Gets content of aggregation toolbarContent.

The content of the toolbar.

Returns:
sap.ui.core.Control[]
getViewKey(): string

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 sap.ui.unified.CalendarIntervalType.Hour.

Returns:
stringValue of property viewKey

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.

Returns:
sap.m.PlanningCalendarView[]
getWidth(): sap.ui.core.CSSSize

Gets current value of property width.

Specifies the width of the PlanningCalendar.

Returns:
sap.ui.core.CSSSizeValue of property width
indexOfRow(oRow): int
Checks for the provided sap.m.PlanningCalendarRow in the aggregation rows. and returns its index if found or -1 otherwise.
Parameters:
sap.m.PlanningCalendarRowoRowThe row whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
indexOfSpecialDate(oSpecialDate): int
Checks for the provided sap.ui.unified.DateTypeRange in the aggregation specialDates. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.unified.DateTypeRangeoSpecialDateThe specialDate whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
indexOfToolbarContent(oToolbarContent): int
Checks for the provided sap.ui.core.Control in the aggregation toolbarContent. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.core.ControloToolbarContentThe toolbarContent whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
indexOfView(oView): int
Checks for the provided sap.m.PlanningCalendarView in the aggregation views. and returns its index if found or -1 otherwise.
Parameters:
sap.m.PlanningCalendarViewoViewThe view whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
insertRow(oRow, iIndex): sap.m.PlanningCalendar
Inserts a row into the aggregation rows.
Parameters:
sap.m.PlanningCalendarRowoRowthe row to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
insertSpecialDate(oSpecialDate, iIndex): sap.m.PlanningCalendar
Inserts a specialDate into the aggregation specialDates.
Parameters:
sap.ui.unified.DateTypeRangeoSpecialDatethe specialDate to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
insertToolbarContent(oToolbarContent, iIndex): sap.m.PlanningCalendar
Inserts a toolbarContent into the aggregation toolbarContent.
Parameters:
sap.ui.core.ControloToolbarContentthe toolbarContent to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
insertView(oView, iIndex): sap.m.PlanningCalendar
Inserts a view into the aggregation views.
Parameters:
sap.m.PlanningCalendarViewoViewthe view to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
removeAllAriaLabelledBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaLabelledBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
Since:
1.40.0
removeAllRows(): sap.m.PlanningCalendarRow[]

Removes all the controls from the aggregation rows.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.m.PlanningCalendarRow[]An array of the removed elements (might be empty)
removeAllSpecialDates(): sap.ui.unified.DateTypeRange[]

Removes all the controls from the aggregation specialDates.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.unified.DateTypeRange[]An array of the removed elements (might be empty)
removeAllToolbarContent(): sap.ui.core.Control[]

Removes all the controls from the aggregation toolbarContent.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.core.Control[]An array of the removed elements (might be empty)
removeAllViews(): sap.m.PlanningCalendarView[]

Removes all the controls from the aggregation views.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.m.PlanningCalendarView[]An array of the removed elements (might be empty)
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.ID
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledByThe ariaLabelledBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed ariaLabelledBy or null
Since:
1.40.0
removeRow(vRow): sap.m.PlanningCalendarRow
Removes a row from the aggregation rows.
Parameters:
int|string|sap.m.PlanningCalendarRowvRowThe row to remove or its index or id
Returns:
sap.m.PlanningCalendarRowThe removed row or null
removeSpecialDate(vSpecialDate): sap.ui.unified.DateTypeRange
Removes a specialDate from the aggregation specialDates.
Parameters:
int|string|sap.ui.unified.DateTypeRangevSpecialDateThe specialDate to remove or its index or id
Returns:
sap.ui.unified.DateTypeRangeThe removed specialDate or null
removeToolbarContent(vToolbarContent): sap.ui.core.Control
Removes a toolbarContent from the aggregation toolbarContent.
Parameters:
int|string|sap.ui.core.ControlvToolbarContentThe toolbarContent to remove or its index or id
Returns:
sap.ui.core.ControlThe removed toolbarContent or null
removeView(vView): sap.m.PlanningCalendarView
Removes a view from the aggregation views.
Parameters:
int|string|sap.m.PlanningCalendarViewvViewThe view to remove or its index or id
Returns:
sap.m.PlanningCalendarViewThe removed view or null
selectAllRows(bSelect): sap.m.PlanningCalendar

Selects or deselects all PlanningCalendarRows.

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

Parameters:
booleanbSelectIndicator showing whether PlanningCalendarRows should be selected or deselected
Returns:
sap.m.PlanningCalendarthis to allow method chaining
setAppointmentsReducedHeight(bAppointmentsReducedHeight): sap.m.PlanningCalendar

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.

Parameters:
booleanbAppointmentsReducedHeightNew value for property appointmentsReducedHeight
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.38.0
setAppointmentsVisualization(sAppointmentsVisualization): sap.m.PlanningCalendar

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.

Parameters:
sap.ui.unified.CalendarAppointmentVisualizationsAppointmentsVisualizationNew value for property appointmentsVisualization
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.40.0
setBuiltInViews(sBuiltInViews): sap.m.PlanningCalendar

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

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

Parameters:
string[]sBuiltInViewsNew value for property builtInViews
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.50
setGroupAppointmentsMode(sGroupAppointmentsMode): sap.m.PlanningCalendar

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.

Parameters:
sap.ui.unified.GroupAppointmentsModesGroupAppointmentsModeNew value for property groupAppointmentsMode
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.48.0
setHeight(sHeight): sap.m.PlanningCalendar

Sets a new value for property height.

Specifies the height of the PlanningCalendar.

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

Parameters:
sap.ui.core.CSSSizesHeightNew value for property height
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
setLegend(oLegend): sap.m.PlanningCalendar
Sets the associated legend.
Parameters:
sap.ui.core.ID|sap.ui.unified.CalendarLegendoLegendID of an element which becomes the new target of this legend association; alternatively, an element instance may be given
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.40.0
setMaxDate(oMaxDate): sap.m.PlanningCalendar

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.

Parameters:
objectoMaxDateNew value for property maxDate
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.38.0
setMinDate(oMinDate): sap.m.PlanningCalendar

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.

Parameters:
objectoMinDateNew value for property minDate
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.38.0
setNoDataText(sNoDataText): sap.m.PlanningCalendar

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.

Parameters:
stringsNoDataTextNew value for property noDataText
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
setShowDayNamesLine(bShowDayNamesLine): sap.m.PlanningCalendar

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.

Parameters:
booleanbShowDayNamesLineNew value for property showDayNamesLine
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.50
setShowEmptyIntervalHeaders(bShowEmptyIntervalHeaders): sap.m.PlanningCalendar

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.

Parameters:
booleanbShowEmptyIntervalHeadersNew value for property showEmptyIntervalHeaders
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
Since:
1.38.0
setShowIntervalHeaders(bShowIntervalHeaders): sap.m.PlanningCalendar

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.

Parameters:
booleanbShowIntervalHeadersNew value for property showIntervalHeaders
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
setShowRowHeaders(bShowRowHeaders): sap.m.PlanningCalendar

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.

Parameters:
booleanbShowRowHeadersNew value for property showRowHeaders
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
setSingleSelection(bSingleSelection): sap.m.PlanningCalendar

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.

Parameters:
booleanbSingleSelectionNew value for property singleSelection
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
setStartDate(oStartDate): sap.m.PlanningCalendar
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).
Parameters:
DateoStartDatethe date to set as sap.m.PlanningCalendarstartDate. May be changed(adjusted) if property startDate is adjusted. See remark about week view above.
Returns:
sap.m.PlanningCalendarthis to allow method chaining
setViewKey(sViewKey): sap.m.PlanningCalendar

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 sap.ui.unified.CalendarIntervalType.Hour.

Parameters:
stringsViewKeyNew value for property viewKey
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining
setWidth(sWidth): sap.m.PlanningCalendar

Sets a new value for property width.

Specifies the width of the PlanningCalendar.

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

Parameters:
sap.ui.core.CSSSizesWidthNew value for property width
Returns:
sap.m.PlanningCalendarReference to this in order to allow method chaining