class sap.m.PlanningCalendarRow

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

Represents a row in the sap.m.PlanningCalendar.

This element holds the data of one row in the sap.m.PlanningCalendar. Once the header information (for example, person information) is assigned, the appointments are assigned. The sap.m.PlanningCalendarRow allows you to modify appointments at row level.


Constructor

Constructor for a new PlanningCalendarRow.

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

Notes: In "One month" view, the appointments cannot be created on small screen (as there they are displayed as a list below the dates).

Since: 1.56.

Visibility: public
enableAppointmentsDragAndDrop boolean false

Determines whether the appointments in the row are draggable.

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

By default, appointments can be dragged only within their original PlanningCalendarRow. When enableAppointmentsDragAndDrop is set to true, attaching the appointmentDragEnter event can change the default behavior and allow appointments to be dragged between calendar rows.

Specifics based on the intervals (hours, days or months) displayed in the PlanningCalendar views:

Hours:
For views where the displayed intervals are hours, the placeholder snaps on every interval of 30 minutes. After the appointment is dropped, the appointmentDrop event is fired, containing the new start and end JavaScript date objects.
For example, an appointment with start date "Nov 13 2017 12:17:00" and end date "Nov 13 2017 12:45:30" lasts for 27 minutes and 30 seconds. After dragging and dropping to a new time, the possible new start date has time that is either "hh:00:00" or "hh:30:00" because of the placeholder that can snap on every 30 minutes. The new end date is calculated to be 27 minutes and 30 seconds later and would be either "hh:27:30" or "hh:57:30".

Days:
For views where intervals are days, the placeholder highlights the whole day and after the appointment is dropped the appointmentDrop event is fired. The event contains the new start and end JavaScript date objects with changed date but the original time (hh:mm:ss) is preserved.

Months:
For views where intervals are months, the placeholder highlights the whole month and after the appointment is dropped the appointmentDrop event is fired. The event contains the new start and end JavaScript date objects with changed month but the original date and time is preserved.

Note: In "One month" view, the appointments are not draggable on small screen (as there they are displayed as a list below the dates). Group appointments are also not draggable.

Since: 1.54.

Visibility: public
enableAppointmentsResize boolean false

Determines whether the appointments in the row are resizable.

The resize interaction is visualized by making the appointment transparent.

Specifics based on the intervals (hours, days or months) displayed in the PlanningCalendar views:

Hours: For views where the displayed intervals are hours, 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.

Days: For views where intervals are days, the appointment snaps to the end of the day. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects. The endDate time is changed to 00:00:00

Months: For views where intervals are months, the appointment snaps to the end of the month. The appointmentResize event is fired, containing the new start and end JavaScript date objects. The endDate is set to the 00:00:00 and first day of the following month.

Notes: In "One month" view, the appointments are not resizable on small screen (as there they are displayed as a list below the dates). Group appointments are also not resizable

Since: 1.56.

Visibility: public
icon sap.ui.core.URI

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

Visibility: public
key string

Defines the identifier of the row.

Visibility: public
noAppointmentsText string

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

Visibility: public
nonWorkingDays int[]

Determines whether the provided weekdays are displayed as non-working days. Valid values inside the array are from 0 to 6 (other values are ignored). If not set, the weekend defined in the locale settings is displayed as non-working days.

Note: The non-working days are visualized if the intervalType property of the sap.m.PlanningCalendarView is set to Day.

Visibility: public
nonWorkingHours int[]

Determines whether the provided hours are displayed as non-working hours. Valid values inside the array are from 0 to 23 (other values are ignored).

Note: The non-working hours are visualized if intervalType property of the sap.m.PlanningCalendarView is set to Hour.

Visibility: public
selected boolean false

Defines the selected state of the PlanningCalendarRow.

Note: Binding the selected property in single selection modes may cause unwanted results if you have more than one selected row in your binding.

Visibility: public
text string

Defines the text of the header (for example, the department of the person).

Visibility: public
title string

Defines the title of the header (for example, the name of the person).

Visibility: public

Aggregations

Default Aggregation:

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

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

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

headerContent 0..n sap.ui.core.Control

Holds the header content of the row.

Note: If the headerContent aggregation is added, then the set icon, description, title and tooltip are ignored.

Since: 1.67.

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

The appointments to be displayed at the top of the intervals (for example, for public holidays). Appointments outside the visible time frame are not rendered.

Keep in mind that the intervalHeaders should always fill whole intervals. If they are shorter or longer than one interval, they are not displayed.

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

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

Holds the special dates in the context of a row. A single date or a date range can be set.

Note Only date or date ranges of type sap.ui.unified.CalendarDayType.NonWorking will be visualized in the PlanningCalendarRow. If the aggregation is set as another type, the date or date range will be ignored and will not be displayed in the control.

Since: 1.56.


Events Overview

Event Description
appointmentCreate

Fired if an appointment is created.

Since: 1.56.

appointmentDragEnter

Fired if an appointment is dropped.

When this event handler is attached, the default behavior of the enableAppointmentsDragAndDrop property to move appointments only within their original calendar row is no longer valid. You can move the appointment around all rows for which enableAppointmentsDragAndDrop is set to true. In this case, the drop target area is indicated by a placeholder. In the event handler you can call the preventDefault method of the event to prevent this default behavior. In this case, the placeholder will no longer be available and it will not be possible to drop the appointment in the row.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.56.

appointmentDrop

Fired if an appointment is dropped.

Since: 1.54.

appointmentResize

Fired if an appointment is resized.

Since: 1.56.

appointmentCreate

Fired if an appointment is created.

Since: 1.56.

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.

calendarRow sap.m.PlanningCalendarRow

The row of the appointment.

appointmentDragEnter

Fired if an appointment is dropped.

When this event handler is attached, the default behavior of the enableAppointmentsDragAndDrop property to move appointments only within their original calendar row is no longer valid. You can move the appointment around all rows for which enableAppointmentsDragAndDrop is set to true. In this case, the drop target area is indicated by a placeholder. In the event handler you can call the preventDefault method of the event to prevent this default behavior. In this case, the placeholder will no longer be available and it will not be possible to drop the appointment in the row.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.56.

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.

calendarRow sap.m.PlanningCalendarRow

The row of the appointment.

appointmentDrop

Fired if an appointment is dropped.

Since: 1.54.

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.

calendarRow sap.m.PlanningCalendarRow

The row of the appointment.

copy boolean

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

appointmentResize

Fired if an appointment is resized.

Since: 1.56.

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.


Methods Overview

Method Description
addAppointment

Adds some appointment to the aggregation appointments.

addHeaderContent

Adds some headerContent to the aggregation headerContent.

addIntervalHeader

Adds some intervalHeader to the aggregation intervalHeaders.

addSpecialDate

Adds some specialDate to the aggregation specialDates.

attachAppointmentCreate

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

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

Fired if an appointment is created.

attachAppointmentDragEnter

Attaches event handler fnFunction to the appointmentDragEnter event of this sap.m.PlanningCalendarRow.

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

Fired if an appointment is dropped.

When this event handler is attached, the default behavior of the enableAppointmentsDragAndDrop property to move appointments only within their original calendar row is no longer valid. You can move the appointment around all rows for which enableAppointmentsDragAndDrop is set to true. In this case, the drop target area is indicated by a placeholder. In the event handler you can call the preventDefault method of the event to prevent this default behavior. In this case, the placeholder will no longer be available and it will not be possible to drop the appointment in the row.

attachAppointmentDrop

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

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

Fired if an appointment is dropped.

attachAppointmentResize

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

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

Fired if an appointment is resized.

destroyAppointments

Destroys all the appointments in the aggregation appointments.

destroyHeaderContent

Destroys all the headerContent in the aggregation headerContent.

destroyIntervalHeaders

Destroys all the intervalHeaders in the aggregation intervalHeaders.

destroySpecialDates

Destroys all the specialDates in the aggregation specialDates.

detachAppointmentCreate

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

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

detachAppointmentDragEnter

Detaches event handler fnFunction from the appointmentDragEnter event of this sap.m.PlanningCalendarRow.

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

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

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

sap.m.PlanningCalendarRow.extend

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

fireAppointmentCreate

Fires event appointmentCreate to attached listeners.

fireAppointmentDragEnter

Fires event appointmentDragEnter to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireAppointmentDrop

Fires event appointmentDrop to attached listeners.

fireAppointmentResize

Fires event appointmentResize to attached listeners.

getAppointments

Gets content of aggregation appointments.

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

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

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

Notes: In "One month" view, the appointments cannot be created on small screen (as there they are displayed as a list below the dates).

Default value is false.

getEnableAppointmentsDragAndDrop

Gets current value of property enableAppointmentsDragAndDrop.

Determines whether the appointments in the row are draggable.

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

By default, appointments can be dragged only within their original PlanningCalendarRow. When enableAppointmentsDragAndDrop is set to true, attaching the appointmentDragEnter event can change the default behavior and allow appointments to be dragged between calendar rows.

Specifics based on the intervals (hours, days or months) displayed in the PlanningCalendar views:

Hours:
For views where the displayed intervals are hours, the placeholder snaps on every interval of 30 minutes. After the appointment is dropped, the appointmentDrop event is fired, containing the new start and end JavaScript date objects.
For example, an appointment with start date "Nov 13 2017 12:17:00" and end date "Nov 13 2017 12:45:30" lasts for 27 minutes and 30 seconds. After dragging and dropping to a new time, the possible new start date has time that is either "hh:00:00" or "hh:30:00" because of the placeholder that can snap on every 30 minutes. The new end date is calculated to be 27 minutes and 30 seconds later and would be either "hh:27:30" or "hh:57:30".

Days:
For views where intervals are days, the placeholder highlights the whole day and after the appointment is dropped the appointmentDrop event is fired. The event contains the new start and end JavaScript date objects with changed date but the original time (hh:mm:ss) is preserved.

Months:
For views where intervals are months, the placeholder highlights the whole month and after the appointment is dropped the appointmentDrop event is fired. The event contains the new start and end JavaScript date objects with changed month but the original date and time is preserved.

Note: In "One month" view, the appointments are not draggable on small screen (as there they are displayed as a list below the dates). Group appointments are also not draggable.

Default value is false.

getEnableAppointmentsResize

Gets current value of property enableAppointmentsResize.

Determines whether the appointments in the row are resizable.

The resize interaction is visualized by making the appointment transparent.

Specifics based on the intervals (hours, days or months) displayed in the PlanningCalendar views:

Hours: For views where the displayed intervals are hours, 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.

Days: For views where intervals are days, the appointment snaps to the end of the day. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects. The endDate time is changed to 00:00:00

Months: For views where intervals are months, the appointment snaps to the end of the month. The appointmentResize event is fired, containing the new start and end JavaScript date objects. The endDate is set to the 00:00:00 and first day of the following month.

Notes: In "One month" view, the appointments are not resizable on small screen (as there they are displayed as a list below the dates). Group appointments are also not resizable

Default value is false.

getHeaderContent

Gets content of aggregation headerContent.

Holds the header content of the row.

Note: If the headerContent aggregation is added, then the set icon, description, title and tooltip are ignored.

getIcon

Gets current value of property icon.

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

getIntervalHeaders

Gets content of aggregation intervalHeaders.

The appointments to be displayed at the top of the intervals (for example, for public holidays). Appointments outside the visible time frame are not rendered.

Keep in mind that the intervalHeaders should always fill whole intervals. If they are shorter or longer than one interval, they are not displayed.

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

getKey

Gets current value of property key.

Defines the identifier of the row.

sap.m.PlanningCalendarRow.getMetadata

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

getNoAppointmentsText

Gets current value of property noAppointmentsText.

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

getNonWorkingDays

Gets current value of property nonWorkingDays.

Determines whether the provided weekdays are displayed as non-working days. Valid values inside the array are from 0 to 6 (other values are ignored). If not set, the weekend defined in the locale settings is displayed as non-working days.

Note: The non-working days are visualized if the intervalType property of the sap.m.PlanningCalendarView is set to Day.

getNonWorkingHours

Gets current value of property nonWorkingHours.

Determines whether the provided hours are displayed as non-working hours. Valid values inside the array are from 0 to 23 (other values are ignored).

Note: The non-working hours are visualized if intervalType property of the sap.m.PlanningCalendarView is set to Hour.

getSelected

Gets current value of property selected.

Defines the selected state of the PlanningCalendarRow.

Note: Binding the selected property in single selection modes may cause unwanted results if you have more than one selected row in your binding.

Default value is false.

getSpecialDates

Gets content of aggregation specialDates.

Holds the special dates in the context of a row. A single date or a date range can be set.

Note Only date or date ranges of type sap.ui.unified.CalendarDayType.NonWorking will be visualized in the PlanningCalendarRow. If the aggregation is set as another type, the date or date range will be ignored and will not be displayed in the control.

getText

Gets current value of property text.

Defines the text of the header (for example, the department of the person).

getTitle

Gets current value of property title.

Defines the title of the header (for example, the name of the person).

indexOfAppointment

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

indexOfHeaderContent

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

indexOfIntervalHeader

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

indexOfSpecialDate

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

insertAppointment

Inserts a appointment into the aggregation appointments.

insertHeaderContent

Inserts a headerContent into the aggregation headerContent.

insertIntervalHeader

Inserts a intervalHeader into the aggregation intervalHeaders.

insertSpecialDate

Inserts a specialDate into the aggregation specialDates.

removeAllAppointments

Removes all the controls from the aggregation appointments.

Additionally, it unregisters them from the hosting UIArea.

removeAllHeaderContent

Removes all the controls from the aggregation headerContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllIntervalHeaders

Removes all the controls from the aggregation intervalHeaders.

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.

removeAppointment

Removes a appointment from the aggregation appointments.

removeHeaderContent

Removes a headerContent from the aggregation headerContent.

removeIntervalHeader

Removes a intervalHeader from the aggregation intervalHeaders.

removeSpecialDate

Removes a specialDate from the aggregation specialDates.

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

Notes: In "One month" view, the appointments cannot be created on small screen (as there they are displayed as a list below the dates).

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 row are draggable.

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

By default, appointments can be dragged only within their original PlanningCalendarRow. When enableAppointmentsDragAndDrop is set to true, attaching the appointmentDragEnter event can change the default behavior and allow appointments to be dragged between calendar rows.

Specifics based on the intervals (hours, days or months) displayed in the PlanningCalendar views:

Hours:
For views where the displayed intervals are hours, the placeholder snaps on every interval of 30 minutes. After the appointment is dropped, the appointmentDrop event is fired, containing the new start and end JavaScript date objects.
For example, an appointment with start date "Nov 13 2017 12:17:00" and end date "Nov 13 2017 12:45:30" lasts for 27 minutes and 30 seconds. After dragging and dropping to a new time, the possible new start date has time that is either "hh:00:00" or "hh:30:00" because of the placeholder that can snap on every 30 minutes. The new end date is calculated to be 27 minutes and 30 seconds later and would be either "hh:27:30" or "hh:57:30".

Days:
For views where intervals are days, the placeholder highlights the whole day and after the appointment is dropped the appointmentDrop event is fired. The event contains the new start and end JavaScript date objects with changed date but the original time (hh:mm:ss) is preserved.

Months:
For views where intervals are months, the placeholder highlights the whole month and after the appointment is dropped the appointmentDrop event is fired. The event contains the new start and end JavaScript date objects with changed month but the original date and time is preserved.

Note: In "One month" view, the appointments are not draggable on small screen (as there they are displayed as a list below the dates). Group appointments are also not draggable.

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 in the row are resizable.

The resize interaction is visualized by making the appointment transparent.

Specifics based on the intervals (hours, days or months) displayed in the PlanningCalendar views:

Hours: For views where the displayed intervals are hours, 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.

Days: For views where intervals are days, the appointment snaps to the end of the day. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects. The endDate time is changed to 00:00:00

Months: For views where intervals are months, the appointment snaps to the end of the month. The appointmentResize event is fired, containing the new start and end JavaScript date objects. The endDate is set to the 00:00:00 and first day of the following month.

Notes: In "One month" view, the appointments are not resizable on small screen (as there they are displayed as a list below the dates). Group appointments are also not resizable

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

Default value is false.

setIcon

Sets a new value for property icon.

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

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

setKey

Sets a new value for property key.

Defines the identifier of the row.

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

setNoAppointmentsText

Sets a new value for property noAppointmentsText.

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

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

setNonWorkingDays

Sets a new value for property nonWorkingDays.

Determines whether the provided weekdays are displayed as non-working days. Valid values inside the array are from 0 to 6 (other values are ignored). If not set, the weekend defined in the locale settings is displayed as non-working days.

Note: The non-working days are visualized if the intervalType property of the sap.m.PlanningCalendarView is set to Day.

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

setNonWorkingHours

Sets a new value for property nonWorkingHours.

Determines whether the provided hours are displayed as non-working hours. Valid values inside the array are from 0 to 23 (other values are ignored).

Note: The non-working hours are visualized if intervalType property of the sap.m.PlanningCalendarView is set to Hour.

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

setSelected

Sets a new value for property selected.

Defines the selected state of the PlanningCalendarRow.

Note: Binding the selected property in single selection modes may cause unwanted results if you have more than one selected row in your binding.

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

Default value is false.

setText

Sets a new value for property text.

Defines the text of the header (for example, the department of the person).

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

setTitle

Sets a new value for property title.

Defines the title of the header (for example, the name of the person).

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

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

addHeaderContent

Adds some headerContent to the aggregation headerContent.

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

The headerContent to add; if empty, nothing is inserted

addIntervalHeader

Adds some intervalHeader to the aggregation intervalHeaders.

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

The intervalHeader to add; if empty, nothing is inserted

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

attachAppointmentCreate

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

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

attachAppointmentDragEnter

Attaches event handler fnFunction to the appointmentDragEnter event of this sap.m.PlanningCalendarRow.

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

Fired if an appointment is dropped.

When this event handler is attached, the default behavior of the enableAppointmentsDragAndDrop property to move appointments only within their original calendar row is no longer valid. You can move the appointment around all rows for which enableAppointmentsDragAndDrop is set to true. In this case, the drop target area is indicated by a placeholder. In the event handler you can call the preventDefault method of the event to prevent this default behavior. In this case, the placeholder will no longer be available and it will not be possible to drop the appointment in the row.

Param Type DefaultValue Description
oData object

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

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

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.PlanningCalendarRow itself

attachAppointmentDrop

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

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

attachAppointmentResize

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

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

Fired if 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.PlanningCalendarRow itself

destroyAppointments

Destroys all the appointments in the aggregation appointments.

destroyHeaderContent

Destroys all the headerContent in the aggregation headerContent.

destroyIntervalHeaders

Destroys all the intervalHeaders in the aggregation intervalHeaders.

destroySpecialDates

Destroys all the specialDates in the aggregation specialDates.

detachAppointmentCreate

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

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

detachAppointmentDragEnter

Detaches event handler fnFunction from the appointmentDragEnter event of this sap.m.PlanningCalendarRow.

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

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

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

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

calendarRow sap.m.PlanningCalendarRow

The row of the appointment.

fireAppointmentDragEnter

Fires event appointmentDragEnter to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

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.

calendarRow sap.m.PlanningCalendarRow

The row of the appointment.

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.

calendarRow sap.m.PlanningCalendarRow

The row of the appointment.

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.

getAppointments

Gets content of aggregation appointments.

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

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

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

Notes: In "One month" view, the appointments cannot be created on small screen (as there they are displayed as a list below the dates).

Default value is false.

getEnableAppointmentsDragAndDrop

Gets current value of property enableAppointmentsDragAndDrop.

Determines whether the appointments in the row are draggable.

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

By default, appointments can be dragged only within their original PlanningCalendarRow. When enableAppointmentsDragAndDrop is set to true, attaching the appointmentDragEnter event can change the default behavior and allow appointments to be dragged between calendar rows.

Specifics based on the intervals (hours, days or months) displayed in the PlanningCalendar views:

Hours:
For views where the displayed intervals are hours, the placeholder snaps on every interval of 30 minutes. After the appointment is dropped, the appointmentDrop event is fired, containing the new start and end JavaScript date objects.
For example, an appointment with start date "Nov 13 2017 12:17:00" and end date "Nov 13 2017 12:45:30" lasts for 27 minutes and 30 seconds. After dragging and dropping to a new time, the possible new start date has time that is either "hh:00:00" or "hh:30:00" because of the placeholder that can snap on every 30 minutes. The new end date is calculated to be 27 minutes and 30 seconds later and would be either "hh:27:30" or "hh:57:30".

Days:
For views where intervals are days, the placeholder highlights the whole day and after the appointment is dropped the appointmentDrop event is fired. The event contains the new start and end JavaScript date objects with changed date but the original time (hh:mm:ss) is preserved.

Months:
For views where intervals are months, the placeholder highlights the whole month and after the appointment is dropped the appointmentDrop event is fired. The event contains the new start and end JavaScript date objects with changed month but the original date and time is preserved.

Note: In "One month" view, the appointments are not draggable on small screen (as there they are displayed as a list below the dates). Group appointments are also not draggable.

Default value is false.

getEnableAppointmentsResize

Gets current value of property enableAppointmentsResize.

Determines whether the appointments in the row are resizable.

The resize interaction is visualized by making the appointment transparent.

Specifics based on the intervals (hours, days or months) displayed in the PlanningCalendar views:

Hours: For views where the displayed intervals are hours, 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.

Days: For views where intervals are days, the appointment snaps to the end of the day. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects. The endDate time is changed to 00:00:00

Months: For views where intervals are months, the appointment snaps to the end of the month. The appointmentResize event is fired, containing the new start and end JavaScript date objects. The endDate is set to the 00:00:00 and first day of the following month.

Notes: In "One month" view, the appointments are not resizable on small screen (as there they are displayed as a list below the dates). Group appointments are also not resizable

Default value is false.

getHeaderContent

Gets content of aggregation headerContent.

Holds the header content of the row.

Note: If the headerContent aggregation is added, then the set icon, description, title and tooltip are ignored.

getIcon

Gets current value of property icon.

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

getIntervalHeaders

Gets content of aggregation intervalHeaders.

The appointments to be displayed at the top of the intervals (for example, for public holidays). Appointments outside the visible time frame are not rendered.

Keep in mind that the intervalHeaders should always fill whole intervals. If they are shorter or longer than one interval, they are not displayed.

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

getKey

Gets current value of property key.

Defines the identifier of the row.

sap.m.PlanningCalendarRow.getMetadata

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

getNoAppointmentsText

Gets current value of property noAppointmentsText.

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

getNonWorkingDays

Gets current value of property nonWorkingDays.

Determines whether the provided weekdays are displayed as non-working days. Valid values inside the array are from 0 to 6 (other values are ignored). If not set, the weekend defined in the locale settings is displayed as non-working days.

Note: The non-working days are visualized if the intervalType property of the sap.m.PlanningCalendarView is set to Day.

getNonWorkingHours

Gets current value of property nonWorkingHours.

Determines whether the provided hours are displayed as non-working hours. Valid values inside the array are from 0 to 23 (other values are ignored).

Note: The non-working hours are visualized if intervalType property of the sap.m.PlanningCalendarView is set to Hour.

getSelected

Gets current value of property selected.

Defines the selected state of the PlanningCalendarRow.

Note: Binding the selected property in single selection modes may cause unwanted results if you have more than one selected row in your binding.

Default value is false.

getSpecialDates

Gets content of aggregation specialDates.

Holds the special dates in the context of a row. A single date or a date range can be set.

Note Only date or date ranges of type sap.ui.unified.CalendarDayType.NonWorking will be visualized in the PlanningCalendarRow. If the aggregation is set as another type, the date or date range will be ignored and will not be displayed in the control.

getText

Gets current value of property text.

Defines the text of the header (for example, the department of the person).

getTitle

Gets current value of property title.

Defines the title of the header (for example, the name of the person).

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

indexOfHeaderContent

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

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

The headerContent whose index is looked for

indexOfIntervalHeader

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

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

The intervalHeader whose index is looked for

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

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

insertHeaderContent

Inserts a headerContent into the aggregation headerContent.

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

The headerContent to insert; if empty, nothing is inserted

iIndex int

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

insertIntervalHeader

Inserts a intervalHeader into the aggregation intervalHeaders.

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

The intervalHeader to insert; if empty, nothing is inserted

iIndex int

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

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

removeAllAppointments

Removes all the controls from the aggregation appointments.

Additionally, it unregisters them from the hosting UIArea.

removeAllHeaderContent

Removes all the controls from the aggregation headerContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllIntervalHeaders

Removes all the controls from the aggregation intervalHeaders.

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.

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

removeHeaderContent

Removes a headerContent from the aggregation headerContent.

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

The headerContent to remove or its index or id

removeIntervalHeader

Removes a intervalHeader from the aggregation intervalHeaders.

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

The intervalHeader to remove or its index or id

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

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

Notes: In "One month" view, the appointments cannot be created on small screen (as there they are displayed as a list below the dates).

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 row are draggable.

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

By default, appointments can be dragged only within their original PlanningCalendarRow. When enableAppointmentsDragAndDrop is set to true, attaching the appointmentDragEnter event can change the default behavior and allow appointments to be dragged between calendar rows.

Specifics based on the intervals (hours, days or months) displayed in the PlanningCalendar views:

Hours:
For views where the displayed intervals are hours, the placeholder snaps on every interval of 30 minutes. After the appointment is dropped, the appointmentDrop event is fired, containing the new start and end JavaScript date objects.
For example, an appointment with start date "Nov 13 2017 12:17:00" and end date "Nov 13 2017 12:45:30" lasts for 27 minutes and 30 seconds. After dragging and dropping to a new time, the possible new start date has time that is either "hh:00:00" or "hh:30:00" because of the placeholder that can snap on every 30 minutes. The new end date is calculated to be 27 minutes and 30 seconds later and would be either "hh:27:30" or "hh:57:30".

Days:
For views where intervals are days, the placeholder highlights the whole day and after the appointment is dropped the appointmentDrop event is fired. The event contains the new start and end JavaScript date objects with changed date but the original time (hh:mm:ss) is preserved.

Months:
For views where intervals are months, the placeholder highlights the whole month and after the appointment is dropped the appointmentDrop event is fired. The event contains the new start and end JavaScript date objects with changed month but the original date and time is preserved.

Note: In "One month" view, the appointments are not draggable on small screen (as there they are displayed as a list below the dates). Group appointments are also not draggable.

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 in the row are resizable.

The resize interaction is visualized by making the appointment transparent.

Specifics based on the intervals (hours, days or months) displayed in the PlanningCalendar views:

Hours: For views where the displayed intervals are hours, 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.

Days: For views where intervals are days, the appointment snaps to the end of the day. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects. The endDate time is changed to 00:00:00

Months: For views where intervals are months, the appointment snaps to the end of the month. The appointmentResize event is fired, containing the new start and end JavaScript date objects. The endDate is set to the 00:00:00 and first day of the following month.

Notes: In "One month" view, the appointments are not resizable on small screen (as there they are displayed as a list below the dates). Group appointments are also not resizable

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

setIcon

Sets a new value for property icon.

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

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

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

New value for property icon

setKey

Sets a new value for property key.

Defines the identifier of the row.

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

Param Type DefaultValue Description
sKey string

New value for property key

setNoAppointmentsText

Sets a new value for property noAppointmentsText.

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

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

Param Type DefaultValue Description
sNoAppointmentsText string

New value for property noAppointmentsText

setNonWorkingDays

Sets a new value for property nonWorkingDays.

Determines whether the provided weekdays are displayed as non-working days. Valid values inside the array are from 0 to 6 (other values are ignored). If not set, the weekend defined in the locale settings is displayed as non-working days.

Note: The non-working days are visualized if the intervalType property of the sap.m.PlanningCalendarView is set to Day.

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

Param Type DefaultValue Description
sNonWorkingDays int[]

New value for property nonWorkingDays

setNonWorkingHours

Sets a new value for property nonWorkingHours.

Determines whether the provided hours are displayed as non-working hours. Valid values inside the array are from 0 to 23 (other values are ignored).

Note: The non-working hours are visualized if intervalType property of the sap.m.PlanningCalendarView is set to Hour.

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

Param Type DefaultValue Description
sNonWorkingHours int[]

New value for property nonWorkingHours

setSelected

Sets a new value for property selected.

Defines the selected state of the PlanningCalendarRow.

Note: Binding the selected property in single selection modes may cause unwanted results if you have more than one selected row in your binding.

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

Default value is false.

Param Type DefaultValue Description
bSelected boolean false

New value for property selected

setText

Sets a new value for property text.

Defines the text of the header (for example, the department of the person).

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

Param Type DefaultValue Description
sText string

New value for property text

setTitle

Sets a new value for property title.

Defines the title of the header (for example, the name of the person).

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

Param Type DefaultValue Description
sTitle string

New value for property title