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 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 |
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). |
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 Specifics based on the intervals (hours, days or months) displayed in the Hours: Days: Months: 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. |
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 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 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 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 |
icon | sap.ui.core.URI | Specifies the URI of an image or an icon registered in |
|
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 |
|
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 |
|
selected | boolean | false | Defines the selected state of the Note: Binding the |
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 |
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 |
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 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 |
Event | Description |
---|---|
appointmentCreate |
Fired if an appointment is created. |
appointmentDragEnter |
Fired if an appointment is dropped. When this event handler is attached, the default behavior of the Listeners may prevent the default action of this event by calling the |
appointmentDrop |
Fired if an appointment is dropped. |
appointmentResize |
Fired if an appointment is resized. |
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. |
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. |
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". |
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. |
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 When called, the context of the event handler (its Fired if an appointment is created. |
attachAppointmentDragEnter |
Attaches event handler When called, the context of the event handler (its Fired if an appointment is dropped. When this event handler is attached, the default behavior of the |
attachAppointmentDrop |
Attaches event handler When called, the context of the event handler (its Fired if an appointment is dropped. |
attachAppointmentResize |
Attaches event handler When called, the context of the event handler (its 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 The passed function and listener object must match the ones used for event registration. |
detachAppointmentDragEnter |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachAppointmentDrop |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachAppointmentResize |
Detaches event handler 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
|
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 |
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 |
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 Specifics based on the intervals (hours, days or months) displayed in the Hours: Days: Months: 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 |
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 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 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 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 |
getHeaderContent |
Gets content of aggregation headerContent. Holds the header content of the row. Note: If the |
getIcon |
Gets current value of property icon. Specifies the URI of an image or an icon registered in |
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 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 |
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 |
getSelected |
Gets current value of property selected. Defines the selected state of the Note: Binding the Default value is |
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 |
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 |
indexOfHeaderContent |
Checks for the provided |
indexOfIntervalHeader |
Checks for the provided |
indexOfSpecialDate |
Checks for the provided |
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 Default value is |
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 Specifics based on the intervals (hours, days or months) displayed in the Hours: Days: Months: 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 Default value is |
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 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 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 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 Default value is |
setIcon |
Sets a new value for property icon. Specifies the URI of an image or an icon registered in When called with a value of |
setKey |
Sets a new value for property key. Defines the identifier of the row. When called with a value of |
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 |
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 When called with a value of |
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 When called with a value of |
setSelected |
Sets a new value for property selected. Defines the selected state of the Note: Binding the When called with a value of Default value is |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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. |
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. |
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". |
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. |
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.
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
.
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
.
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
.
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.
Gets current value of property icon.
Specifies the URI of an image or an icon registered in sap.ui.core.IconPool
.
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.
Returns a metadata object for class sap.m.PlanningCalendarRow.
Gets current value of property noAppointmentsText.
Defines the text that is displayed when no CalendarAppointments are assigned.
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
.
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
.
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
.
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.
Gets current value of property text.
Defines the text of the header (for example, the department of the person).
Gets current value of property title.
Defines the title of the header (for example, the name of the person).
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Removes all the controls from the aggregation appointments.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation headerContent.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation intervalHeaders.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation specialDates.
Additionally, it unregisters them from the hosting UIArea.
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |