class sap.m.SinglePlanningCalendar

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/m/SinglePlanningCalendar
Application Component: CA-UI5-CTR

Displays a calendar of a single entity (such as person, resource) for the selected time interval.

Overview

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 SinglePlanningCalendar uses parts of the sap.ui.unified library. This library will be loaded after the SinglePlanningCalendar, if it wasn't previously loaded. This could lead to CSP compliance issues and adds an additional waiting time when a SinglePlanningCalendar is used for the first time. To prevent this, apps using the SinglePlanningCalendar must also load the sap.ui.unified library in advance.

The SinglePlanningCalendar has the following structure:


Constructor

Constructor for a new SinglePlanningCalendar.

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.SinglePlanningCalendar(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
enableAppointmentsCreate boolean false

Determines whether the appointments can be created by dragging on empty cells.

See enableAppointmentsResize for the specific points for events snapping

Since: 1.65.

Visibility: public
enableAppointmentsDragAndDrop boolean false

Determines whether the appointments in the grid are draggable.

The drag and drop interaction is visualized by a placeholder highlighting the area where the appointment can be dropped by the user.

Since: 1.64.

Visibility: public
enableAppointmentsResize boolean false

Determines whether the appointments are resizable.

The resize interaction is visualized by making the appointment transparent.

The appointment snaps on every interval of 30 minutes. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects.

Since: 1.65.

Visibility: public
endHour int 24

Determines the end hour of the grid to be shown if the fullDay property is set to false. Otherwise the next hours are displayed as non-working. The passed hour is considered as 24-hour based.

Visibility: public
fullDay boolean true

Determines if all of the hours in a day are displayed. If set to false, the hours shown are between the startHour and endHour.

Visibility: public
startDate object

Determines the start date of the grid, as a JavaScript date object. It is considered as a local date. The time part will be ignored. The current date is used as default.

Visibility: public
startHour int 0

Determines the start hour of the grid to be shown if the fullDay property is set to false. Otherwise the previous hours are displayed as non-working. The passed hour is considered as 24-hour based.

Visibility: public
stickyMode sap.m.PlanningCalendarStickyMode None

Determines which part of the control will remain fixed at the top of the page during vertical scrolling as long as the control is in the viewport.

Note: Limited browser support. Browsers which do not support this feature:

  • Microsoft Internet Explorer
  • Microsoft Edge lower than version 41 (EdgeHTML 16)
  • Mozilla Firefox lower than version 59


Since: 1.62.

Visibility: public
title string empty string

Determines the title of the SinglePlanningCalendar.

Visibility: public

Aggregations

Default Aggregation:

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

The grid part of the SinglePlanningCalendar.

_header 0..1 sap.m.PlanningCalendarHeader

The header part of the SinglePlanningCalendar.

_mvgrid 0..1 sap.ui.core.Control

The grid part of the SinglePlanningCalendar.

actions 0..n sap.ui.core.Control

The controls to be passed to the toolbar.

appointments 0..n sap.ui.unified.CalendarAppointment

The appointments to be displayed in the grid. Appointments outside the visible time frame are not rendered. Appointments, longer than a day, will be displayed in all of the affected days. To display an all-day appointment, the appointment must start at 00:00 and end on any day in the future in 00:00h.

Note: The customContent functionality of the CalendarAppointment is not available in the SinglePlanningCalendar. If set, it will not make any effect.

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

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

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

Since: 1.66.

views 0..n sap.m.SinglePlanningCalendarView

Views of the SinglePlanningCalendar.

Note: If not set, the Week view is available.


Associations

Name Cardinality Type Description
legend 0..1 sap.m.PlanningCalendarLegend

Association to the PlanningCalendarLegend 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.65.0.

selectedView 0..1 sap.m.SinglePlanningCalendarView

Corresponds to the currently selected view.


Events Overview

Event Description
appointmentCreate

Fired if an appointment is created.

Since: 1.65.

appointmentDrop

Fired if an appointment is dropped.

Since: 1.64.

appointmentResize

Fired when an appointment is resized.

Since: 1.65.

appointmentSelect

Fired when the selected state of an appointment is changed.

cellPress

Fired when a grid cell is pressed.

Since: 1.65.

headerDateSelect

Fired if a date is selected in the calendar header.

moreLinkPress

Fired when a 'more' button is pressed. Note: The 'more' button appears in a month view cell when multiple appointments exist and the available space is not sufficient to display all of them.

startDateChange

startDate is changed while navigating in the SinglePlanningCalendar.

viewChange

The view was changed by user interaction.

Since: 1.71.0.

appointmentCreate

Fired if an appointment is created.

Since: 1.65.

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

Start date of the created appointment, as a JavaScript date object.

endDate object

End date of the created appointment, as a JavaScript date object.

appointmentDrop

Fired if an appointment is dropped.

Since: 1.64.

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

The dropped appointment.

startDate object

Start date of the dropped appointment, as a JavaScript date object.

endDate object

Dropped appointment end date as a JavaScript date object.

copy boolean

The drop type. If true - it's "Copy", if false - it's "Move".

appointmentResize

Fired when an appointment is resized.

Since: 1.65.

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

The resized appointment.

startDate object

Start date of the resized appointment, as a JavaScript date object.

endDate object

End date of the resized appointment, as a JavaScript date object.

appointmentSelect

Fired when the selected state of an appointment is changed.

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

The appointment on which the event was triggered.

appointments sap.ui.unified.CalendarAppointment[]

All appointments with changed selected state.

Since: 1.67.0.

cellPress

Fired when a grid cell is pressed.

Since: 1.65.

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

The start date as a JavaScript date object of the focused grid cell.

endDate object

The end date as a JavaScript date object of the focused grid cell.

headerDateSelect

Fired if a date is selected in the calendar header.

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

Date of the selected header, as a JavaScript date object. It is considered as a local date.

moreLinkPress

Fired when a 'more' button is pressed. Note: The 'more' button appears in a month view cell when multiple appointments exist and the available space is not sufficient to display all of them.

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

The date as a JavaScript date object of the cell with the pressed more link.

startDateChange

startDate is changed while navigating in the SinglePlanningCalendar.

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

The new start date, as a JavaScript date object. It is considered as a local date.

viewChange

The view was changed by user interaction.

Since: 1.71.0.

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

Methods Overview

Method Description
addAction

Adds some action to the aggregation actions.

addAppointment

Adds some appointment to the aggregation appointments.

addSpecialDate

Adds some specialDate to the aggregation specialDates.

addView

Adds some view to the aggregation views.

attachAppointmentCreate

Attaches event handler fnFunction to the appointmentCreate event of this sap.m.SinglePlanningCalendar.

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

Fired if an appointment is created.

attachAppointmentDrop

Attaches event handler fnFunction to the appointmentDrop event of this sap.m.SinglePlanningCalendar.

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

Fired if an appointment is dropped.

attachAppointmentResize

Attaches event handler fnFunction to the appointmentResize event of this sap.m.SinglePlanningCalendar.

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

Fired when an appointment is resized.

attachAppointmentSelect

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

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

Fired when the selected state of an appointment is changed.

attachCellPress

Attaches event handler fnFunction to the cellPress event of this sap.m.SinglePlanningCalendar.

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

Fired when a grid cell is pressed.

attachHeaderDateSelect

Attaches event handler fnFunction to the headerDateSelect event of this sap.m.SinglePlanningCalendar.

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

Fired if a date is selected in the calendar header.

attachMoreLinkPress

Attaches event handler fnFunction to the moreLinkPress event of this sap.m.SinglePlanningCalendar.

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

Fired when a 'more' button is pressed. Note: The 'more' button appears in a month view cell when multiple appointments exist and the available space is not sufficient to display all of them.

attachStartDateChange

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

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

startDate is changed while navigating in the SinglePlanningCalendar.

attachViewChange

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

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

The view was changed by user interaction.

destroyActions

Destroys all the actions in the aggregation actions.

destroyAppointments

Destroys all the appointments in the aggregation appointments.

destroySpecialDates

Destroys all the specialDates in the aggregation specialDates.

destroyViews

Destroys all the views in the aggregation views.

detachAppointmentCreate

Detaches event handler fnFunction from the appointmentCreate event of this sap.m.SinglePlanningCalendar.

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

detachAppointmentDrop

Detaches event handler fnFunction from the appointmentDrop event of this sap.m.SinglePlanningCalendar.

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

detachAppointmentResize

Detaches event handler fnFunction from the appointmentResize event of this sap.m.SinglePlanningCalendar.

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

detachAppointmentSelect

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

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

detachCellPress

Detaches event handler fnFunction from the cellPress event of this sap.m.SinglePlanningCalendar.

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

detachHeaderDateSelect

Detaches event handler fnFunction from the headerDateSelect event of this sap.m.SinglePlanningCalendar.

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

detachMoreLinkPress

Detaches event handler fnFunction from the moreLinkPress event of this sap.m.SinglePlanningCalendar.

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

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

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

sap.m.SinglePlanningCalendar.extend

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

fireAppointmentCreate

Fires event appointmentCreate to attached listeners.

fireAppointmentDrop

Fires event appointmentDrop to attached listeners.

fireAppointmentResize

Fires event appointmentResize to attached listeners.

fireAppointmentSelect

Fires event appointmentSelect to attached listeners.

fireCellPress

Fires event cellPress to attached listeners.

fireHeaderDateSelect

Fires event headerDateSelect to attached listeners.

fireMoreLinkPress

Fires event moreLinkPress to attached listeners.

fireStartDateChange

Fires event startDateChange to attached listeners.

fireViewChange

Fires event viewChange to attached listeners.

getActions

Gets content of aggregation actions.

The controls to be passed to the toolbar.

getAppointments

Gets content of aggregation appointments.

The appointments to be displayed in the grid. Appointments outside the visible time frame are not rendered. Appointments, longer than a day, will be displayed in all of the affected days. To display an all-day appointment, the appointment must start at 00:00 and end on any day in the future in 00:00h.

Note: The customContent functionality of the CalendarAppointment is not available in the SinglePlanningCalendar. If set, it will not make any effect.

getEnableAppointmentsCreate

Gets current value of property enableAppointmentsCreate.

Determines whether the appointments can be created by dragging on empty cells.

See enableAppointmentsResize for the specific points for events snapping

Default value is false.

getEnableAppointmentsDragAndDrop

Gets current value of property enableAppointmentsDragAndDrop.

Determines whether the appointments in the grid are draggable.

The drag and drop interaction is visualized by a placeholder highlighting the area where the appointment can be dropped by the user.

Default value is false.

getEnableAppointmentsResize

Gets current value of property enableAppointmentsResize.

Determines whether the appointments are resizable.

The resize interaction is visualized by making the appointment transparent.

The appointment snaps on every interval of 30 minutes. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects.

Default value is false.

getEndHour

Gets current value of property endHour.

Determines the end hour of the grid to be shown if the fullDay property is set to false. Otherwise the next hours are displayed as non-working. The passed hour is considered as 24-hour based.

Default value is 24.

getFullDay

Gets current value of property fullDay.

Determines if all of the hours in a day are displayed. If set to false, the hours shown are between the startHour and endHour.

Default value is true.

getLegend

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

sap.m.SinglePlanningCalendar.getMetadata

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

getSelectedAppointments

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

getSelectedView

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

getSpecialDates

Gets content of aggregation specialDates.

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

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

getStartDate

Gets current value of property startDate.

Determines the start date of the grid, as a JavaScript date object. It is considered as a local date. The time part will be ignored. The current date is used as default.

getStartHour

Gets current value of property startHour.

Determines the start hour of the grid to be shown if the fullDay property is set to false. Otherwise the previous hours are displayed as non-working. The passed hour is considered as 24-hour based.

Default value is 0.

getStickyMode

Gets current value of property stickyMode.

Determines which part of the control will remain fixed at the top of the page during vertical scrolling as long as the control is in the viewport.

Note: Limited browser support. Browsers which do not support this feature:

  • Microsoft Internet Explorer
  • Microsoft Edge lower than version 41 (EdgeHTML 16)
  • Mozilla Firefox lower than version 59

Default value is None.

getTitle

Gets current value of property title.

Determines the title of the SinglePlanningCalendar.

Default value is empty string.

getViewByKey

Finds the view object by given key

getViews

Gets content of aggregation views.

Views of the SinglePlanningCalendar.

Note: If not set, the Week view is available.

indexOfAction

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

indexOfAppointment

Checks for the provided sap.ui.unified.CalendarAppointment in the aggregation appointments. 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.

indexOfView

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

insertAction

Inserts a action into the aggregation actions.

insertAppointment

Inserts a appointment into the aggregation appointments.

insertSpecialDate

Inserts a specialDate into the aggregation specialDates.

insertView

Inserts a view into the aggregation views.

removeAction

Removes a action from the aggregation actions.

removeAllActions

Removes all the controls from the aggregation actions.

Additionally, it unregisters them from the hosting UIArea.

removeAllAppointments

Removes all the controls from the aggregation appointments.

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.

removeAllViews

Removes all the controls from the aggregation views.

Additionally, it unregisters them from the hosting UIArea.

removeAppointment

Removes a appointment from the aggregation appointments.

removeSpecialDate

Removes a specialDate from the aggregation specialDates.

removeView

Removes a view from the aggregation views.

setEnableAppointmentsCreate

Sets a new value for property enableAppointmentsCreate.

Determines whether the appointments can be created by dragging on empty cells.

See enableAppointmentsResize for the specific points for events snapping

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

Default value is false.

setEnableAppointmentsDragAndDrop

Sets a new value for property enableAppointmentsDragAndDrop.

Determines whether the appointments in the grid are draggable.

The drag and drop interaction is visualized by a placeholder highlighting the area where the appointment can be dropped by the user.

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

Default value is false.

setEnableAppointmentsResize

Sets a new value for property enableAppointmentsResize.

Determines whether the appointments are resizable.

The resize interaction is visualized by making the appointment transparent.

The appointment snaps on every interval of 30 minutes. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects.

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

Default value is false.

setEndHour

Sets a new value for property endHour.

Determines the end hour of the grid to be shown if the fullDay property is set to false. Otherwise the next hours are displayed as non-working. The passed hour is considered as 24-hour based.

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

Default value is 24.

setFullDay

Sets a new value for property fullDay.

Determines if all of the hours in a day are displayed. If set to false, the hours shown are between the startHour and endHour.

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

Default value is true.

setLegend

Sets the associated legend.

setSelectedView

Sets the associated selectedView.

setStartDate

Sets a new value for property startDate.

Determines the start date of the grid, as a JavaScript date object. It is considered as a local date. The time part will be ignored. The current date is used as default.

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

setStartHour

Sets a new value for property startHour.

Determines the start hour of the grid to be shown if the fullDay property is set to false. Otherwise the previous hours are displayed as non-working. The passed hour is considered as 24-hour based.

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

Default value is 0.

setStickyMode

Sets a new value for property stickyMode.

Determines which part of the control will remain fixed at the top of the page during vertical scrolling as long as the control is in the viewport.

Note: Limited browser support. Browsers which do not support this feature:

  • Microsoft Internet Explorer
  • Microsoft Edge lower than version 41 (EdgeHTML 16)
  • Mozilla Firefox lower than version 59

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

Default value is None.

setTitle

Sets a new value for property title.

Determines the title of the SinglePlanningCalendar.

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

Default value is empty string.

addAction

Adds some action to the aggregation actions.

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

The action to add; if empty, nothing is inserted

addAppointment

Adds some appointment to the aggregation appointments.

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

The appointment to add; if empty, nothing is inserted

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

addView

Adds some view to the aggregation views.

Param Type DefaultValue Description
oView sap.m.SinglePlanningCalendarView

The view to add; if empty, nothing is inserted

attachAppointmentCreate

Attaches event handler fnFunction to the appointmentCreate event of this sap.m.SinglePlanningCalendar.

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

Fired if an appointment is created.

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

attachAppointmentDrop

Attaches event handler fnFunction to the appointmentDrop event of this sap.m.SinglePlanningCalendar.

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

Fired if an appointment is dropped.

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

attachAppointmentResize

Attaches event handler fnFunction to the appointmentResize event of this sap.m.SinglePlanningCalendar.

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

Fired when an appointment is resized.

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

attachAppointmentSelect

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

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

Fired when the selected state of an appointment 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.SinglePlanningCalendar itself

attachCellPress

Attaches event handler fnFunction to the cellPress event of this sap.m.SinglePlanningCalendar.

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

Fired when a grid cell is pressed.

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

attachHeaderDateSelect

Attaches event handler fnFunction to the headerDateSelect event of this sap.m.SinglePlanningCalendar.

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

Fired if a date is selected in the calendar header.

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

attachMoreLinkPress

Attaches event handler fnFunction to the moreLinkPress event of this sap.m.SinglePlanningCalendar.

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

Fired when a 'more' button is pressed. Note: The 'more' button appears in a month view cell when multiple appointments exist and the available space is not sufficient to display all of them.

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

attachStartDateChange

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

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

startDate is changed while navigating in the SinglePlanningCalendar.

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

attachViewChange

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

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

The view 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.SinglePlanningCalendar itself

destroyActions

Destroys all the actions in the aggregation actions.

destroyAppointments

Destroys all the appointments in the aggregation appointments.

destroySpecialDates

Destroys all the specialDates in the aggregation specialDates.

destroyViews

Destroys all the views in the aggregation views.

detachAppointmentCreate

Detaches event handler fnFunction from the appointmentCreate event of this sap.m.SinglePlanningCalendar.

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

detachAppointmentDrop

Detaches event handler fnFunction from the appointmentDrop event of this sap.m.SinglePlanningCalendar.

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

detachAppointmentResize

Detaches event handler fnFunction from the appointmentResize event of this sap.m.SinglePlanningCalendar.

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

detachAppointmentSelect

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

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

detachCellPress

Detaches event handler fnFunction from the cellPress event of this sap.m.SinglePlanningCalendar.

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

detachHeaderDateSelect

Detaches event handler fnFunction from the headerDateSelect event of this sap.m.SinglePlanningCalendar.

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

detachMoreLinkPress

Detaches event handler fnFunction from the moreLinkPress event of this sap.m.SinglePlanningCalendar.

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

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

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

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

fireAppointmentCreate

Fires event appointmentCreate to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

startDate object

Start date of the created appointment, as a JavaScript date object.

endDate object

End date of the created appointment, as a JavaScript date object.

fireAppointmentDrop

Fires event appointmentDrop to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

appointment sap.ui.unified.CalendarAppointment

The dropped appointment.

startDate object

Start date of the dropped appointment, as a JavaScript date object.

endDate object

Dropped appointment end date as a JavaScript date object.

copy boolean

The drop type. If true - it's "Copy", if false - it's "Move".

fireAppointmentResize

Fires event appointmentResize to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

appointment sap.ui.unified.CalendarAppointment

The resized appointment.

startDate object

Start date of the resized appointment, as a JavaScript date object.

endDate object

End date of the resized appointment, as a JavaScript date object.

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 appointment on which the event was triggered.

appointments sap.ui.unified.CalendarAppointment[]

All appointments with changed selected state.

fireCellPress

Fires event cellPress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

startDate object

The start date as a JavaScript date object of the focused grid cell.

endDate object

The end date as a JavaScript date object of the focused grid cell.

fireHeaderDateSelect

Fires event headerDateSelect to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

date object

Date of the selected header, as a JavaScript date object. It is considered as a local date.

fireMoreLinkPress

Fires event moreLinkPress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

date object

The date as a JavaScript date object of the cell with the pressed more link.

fireStartDateChange

Fires event startDateChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

date object

The new start date, as a JavaScript date object. It is considered as a local date.

fireViewChange

Fires event viewChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getActions

Gets content of aggregation actions.

The controls to be passed to the toolbar.

getAppointments

Gets content of aggregation appointments.

The appointments to be displayed in the grid. Appointments outside the visible time frame are not rendered. Appointments, longer than a day, will be displayed in all of the affected days. To display an all-day appointment, the appointment must start at 00:00 and end on any day in the future in 00:00h.

Note: The customContent functionality of the CalendarAppointment is not available in the SinglePlanningCalendar. If set, it will not make any effect.

getEnableAppointmentsCreate

Gets current value of property enableAppointmentsCreate.

Determines whether the appointments can be created by dragging on empty cells.

See enableAppointmentsResize for the specific points for events snapping

Default value is false.

getEnableAppointmentsDragAndDrop

Gets current value of property enableAppointmentsDragAndDrop.

Determines whether the appointments in the grid are draggable.

The drag and drop interaction is visualized by a placeholder highlighting the area where the appointment can be dropped by the user.

Default value is false.

getEnableAppointmentsResize

Gets current value of property enableAppointmentsResize.

Determines whether the appointments are resizable.

The resize interaction is visualized by making the appointment transparent.

The appointment snaps on every interval of 30 minutes. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects.

Default value is false.

getEndHour

Gets current value of property endHour.

Determines the end hour of the grid to be shown if the fullDay property is set to false. Otherwise the next hours are displayed as non-working. The passed hour is considered as 24-hour based.

Default value is 24.

getFullDay

Gets current value of property fullDay.

Determines if all of the hours in a day are displayed. If set to false, the hours shown are between the startHour and endHour.

Default value is true.

getLegend

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

sap.m.SinglePlanningCalendar.getMetadata

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

getSelectedAppointments

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

getSelectedView

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

getSpecialDates

Gets content of aggregation specialDates.

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

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

getStartDate

Gets current value of property startDate.

Determines the start date of the grid, as a JavaScript date object. It is considered as a local date. The time part will be ignored. The current date is used as default.

getStartHour

Gets current value of property startHour.

Determines the start hour of the grid to be shown if the fullDay property is set to false. Otherwise the previous hours are displayed as non-working. The passed hour is considered as 24-hour based.

Default value is 0.

getStickyMode

Gets current value of property stickyMode.

Determines which part of the control will remain fixed at the top of the page during vertical scrolling as long as the control is in the viewport.

Note: Limited browser support. Browsers which do not support this feature:

Default value is None.

getTitle

Gets current value of property title.

Determines the title of the SinglePlanningCalendar.

Default value is empty string.

getViewByKey

Finds the view object by given key

Param Type DefaultValue Description
sKey string

The key of the view

getViews

Gets content of aggregation views.

Views of the SinglePlanningCalendar.

Note: If not set, the Week view is available.

indexOfAction

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

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

The action whose index is looked for

indexOfAppointment

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

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

The appointment whose index is looked for

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

indexOfView

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

Param Type DefaultValue Description
oView sap.m.SinglePlanningCalendarView

The view whose index is looked for

insertAction

Inserts a action into the aggregation actions.

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

The action to insert; if empty, nothing is inserted

iIndex int

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

insertAppointment

Inserts a appointment into the aggregation appointments.

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

The appointment to insert; if empty, nothing is inserted

iIndex int

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

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

insertView

Inserts a view into the aggregation views.

Param Type DefaultValue Description
oView sap.m.SinglePlanningCalendarView

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

removeAction

Removes a action from the aggregation actions.

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

The action to remove or its index or id

removeAllActions

Removes all the controls from the aggregation actions.

Additionally, it unregisters them from the hosting UIArea.

removeAllAppointments

Removes all the controls from the aggregation appointments.

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.

removeAllViews

Removes all the controls from the aggregation views.

Additionally, it unregisters them from the hosting UIArea.

removeAppointment

Removes a appointment from the aggregation appointments.

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

The appointment to remove or its index or id

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

removeView

Removes a view from the aggregation views.

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

The view to remove or its index or id

setEnableAppointmentsCreate

Sets a new value for property enableAppointmentsCreate.

Determines whether the appointments can be created by dragging on empty cells.

See enableAppointmentsResize for the specific points for events snapping

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

New value for property enableAppointmentsCreate

setEnableAppointmentsDragAndDrop

Sets a new value for property enableAppointmentsDragAndDrop.

Determines whether the appointments in the grid are draggable.

The drag and drop interaction is visualized by a placeholder highlighting the area where the appointment can be dropped by the user.

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

New value for property enableAppointmentsDragAndDrop

setEnableAppointmentsResize

Sets a new value for property enableAppointmentsResize.

Determines whether the appointments are resizable.

The resize interaction is visualized by making the appointment transparent.

The appointment snaps on every interval of 30 minutes. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects.

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

New value for property enableAppointmentsResize

setEndHour

Sets a new value for property endHour.

Determines the end hour of the grid to be shown if the fullDay property is set to false. Otherwise the next hours are displayed as non-working. The passed hour is considered as 24-hour based.

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

Default value is 24.

Param Type DefaultValue Description
iEndHour int 24

New value for property endHour

setFullDay

Sets a new value for property fullDay.

Determines if all of the hours in a day are displayed. If set to false, the hours shown are between the startHour and endHour.

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

New value for property fullDay

setLegend

Sets the associated legend.

Param Type DefaultValue Description
oLegend sap.ui.core.ID sap.m.PlanningCalendarLegend

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

setSelectedView

Sets the associated selectedView.

Param Type DefaultValue Description
oSelectedView sap.ui.core.ID sap.m.SinglePlanningCalendarView

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

setStartDate

Sets a new value for property startDate.

Determines the start date of the grid, as a JavaScript date object. It is considered as a local date. The time part will be ignored. The current date is used as default.

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

Param Type DefaultValue Description
oStartDate object

New value for property startDate

setStartHour

Sets a new value for property startHour.

Determines the start hour of the grid to be shown if the fullDay property is set to false. Otherwise the previous hours are displayed as non-working. The passed hour is considered as 24-hour based.

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

Default value is 0.

Param Type DefaultValue Description
iStartHour int 0

New value for property startHour

setStickyMode

Sets a new value for property stickyMode.

Determines which part of the control will remain fixed at the top of the page during vertical scrolling as long as the control is in the viewport.

Note: Limited browser support. Browsers which do not support this feature:

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
sStickyMode sap.m.PlanningCalendarStickyMode None

New value for property stickyMode

setTitle

Sets a new value for property title.

Determines the title of the SinglePlanningCalendar.

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

Default value is empty string.

Param Type DefaultValue Description
sTitle string ""

New value for property title