Displays a calendar of a single entity (such as person, resource) for the selected time interval.
Note: The application developer should add dependency to sap.ui.unified
library on application level to ensure that the library is loaded before the module dependencies will be required. The SinglePlanningCalendar
uses parts of the sap.ui.unified
library. This library will be loaded after the SinglePlanningCalendar
, if it wasn't previously loaded. This could lead to CSP compliance issues and adds an additional waiting time when a SinglePlanningCalendar
is used for the first time. To prevent this, apps using the SinglePlanningCalendar
must also load the sap.ui.unified
library in advance.
The SinglePlanningCalendar
has the following structure:
PlanningCalendarHeader
at the top. It contains the title
set from the corresponding property, the SegmentedButton
, which facilitates navigation through the views, controls, passed to the actions
aggregation and the navigation, assisting the user in choosing the desired time period. The views, either custom or not, can be configured and passed through the views
aggregation.To create custom views, extend the SinglePlanningCalendarView
basic view class. It defines three methods that should be overwritten: getEntityCount
, getScrollEntityCount
and calculateStartDate
getEntityCount
- returns number of columns to be displayedgetScrollEntityCount
- used when next and previous arrows in the calendar are used. For example, in work week view, the getEntityCount
returns 5 (5 columns from Monday to Friday), but when next arrow is selected, the control navigates 7 days ahead and getScrollEntityCount
returns 7.calculateStartDate
- calculates the first day displayed in the calendar based on the startDate
property of the SinglePlanningCalendar
. For example, it returns the first date of a month or a week to display the first 10 days of the month.SinglePlanningCalendarGrid
or SinglePlanningCalendarMonthGrid
, which displays the appointments, set to the visual time range. An all-day appointment is an appointment which starts at 00:00 and ends in 00:00 on any day in the future. Constructor for a new SinglePlanningCalendar
.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.m.SinglePlanningCalendar(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | id for the new control, generated automatically if no id is given |
|
mSettings? | object | initial settings for the new control |
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 |
enableAppointmentsDragAndDrop | boolean | false | Determines whether the appointments in the grid are draggable. The drag and drop interaction is visualized by a placeholder highlighting the area where the appointment can be dropped by the user. |
enableAppointmentsResize | boolean | false | Determines whether the appointments are resizable. The resize interaction is visualized by making the appointment transparent. The appointment snaps on every interval of 30 minutes. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects. |
endHour | int | 24 | Determines the end hour of the grid to be shown if the |
fullDay | boolean | true | Determines if all of the hours in a day are displayed. If set to |
startDate | object | Determines the start date of the grid, as a JavaScript date object. It is considered as a local date. The time part will be ignored. The current date is used as default. Visibility: public |
|
startHour | int | 0 | Determines the start hour of the grid to be shown if the |
stickyMode | sap.m.PlanningCalendarStickyMode | None | Determines which part of the control will remain fixed at the top of the page during vertical scrolling as long as the control is in the viewport. Note: Limited browser support. Browsers which do not support this feature:
Since: 1.62.Visibility: public |
title | string | empty string | Determines the title of the |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
_grid | 0..1 | sap.ui.core.Control |
The grid part of the |
_header | 0..1 | sap.m.PlanningCalendarHeader |
The header part of the |
_mvgrid | 0..1 | sap.ui.core.Control |
The grid part of the |
actions | 0..n | sap.ui.core.Control |
The controls to be passed to the toolbar. |
appointments | 0..n | sap.ui.unified.CalendarAppointment |
The appointments to be displayed in the grid. Appointments outside the visible time frame are not rendered. Appointments, longer than a day, will be displayed in all of the affected days. To display an all-day appointment, the appointment must start at 00:00 and end on any day in the future in 00:00h. Note: The |
specialDates | 0..n | sap.ui.unified.DateTypeRange |
Special days in the header visualized as a date range with type. Note: If one day is assigned to more than one type, only the first type is used. |
views | 0..n | sap.m.SinglePlanningCalendarView |
Views of the Note: If not set, the Week view is available. |
Name | Cardinality | Type | Description |
---|---|---|---|
legend | 0..1 | sap.m.PlanningCalendarLegend |
Association to the Note: The legend does not have to be rendered but must exist and all required types must be assigned. |
selectedView | 0..1 | sap.m.SinglePlanningCalendarView |
Corresponds to the currently selected view. |
Event | Description |
---|---|
appointmentCreate |
Fired if an appointment is created. |
appointmentDrop |
Fired if an appointment is dropped. |
appointmentResize |
Fired when an appointment is resized. |
appointmentSelect |
Fired when the selected state of an appointment is changed. |
cellPress |
Fired when a grid cell is pressed. |
headerDateSelect |
Fired if a date is selected in the calendar header. |
moreLinkPress |
Fired when a 'more' button is pressed. Note: The 'more' button appears in a month view cell when multiple appointments exist and the available space is not sufficient to display all of them. |
startDateChange |
|
viewChange |
The view was changed by user interaction. |
Fired if an appointment is created.
Since: 1.65.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
startDate | object |
Start date of the created appointment, as a JavaScript date object. |
endDate | object |
End date of the created appointment, as a JavaScript date object. |
Fired if an appointment is dropped.
Since: 1.64.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
appointment | sap.ui.unified.CalendarAppointment |
The dropped appointment. |
startDate | object |
Start date of the dropped appointment, as a JavaScript date object. |
endDate | object |
Dropped appointment end date as a JavaScript date object. |
copy | boolean |
The drop type. If true - it's "Copy", if false - it's "Move". |
Fired when an appointment is resized.
Since: 1.65.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
appointment | sap.ui.unified.CalendarAppointment |
The resized appointment. |
startDate | object |
Start date of the resized appointment, as a JavaScript date object. |
endDate | object |
End date of the resized appointment, as a JavaScript date object. |
Fired when the selected state of an appointment is changed.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
appointment | sap.ui.unified.CalendarAppointment |
The appointment on which the event was triggered. |
appointments | sap.ui.unified.CalendarAppointment[] |
All appointments with changed selected state. |
Fired when a grid cell is pressed.
Since: 1.65.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
startDate | object |
The start date as a JavaScript date object of the focused grid cell. |
endDate | object |
The end date as a JavaScript date object of the focused grid cell. |
Fired if a date is selected in the calendar header.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
date | object |
Date of the selected header, as a JavaScript date object. It is considered as a local date. |
Fired when a 'more' button is pressed. Note: The 'more' button appears in a month view cell when multiple appointments exist and the available space is not sufficient to display all of them.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
date | object |
The date as a JavaScript date object of the cell with the pressed more link. |
Method | Description |
---|---|
addAction |
Adds some action to the aggregation actions. |
addAppointment |
Adds some appointment to the aggregation appointments. |
addSpecialDate |
Adds some specialDate to the aggregation specialDates. |
addView |
Adds some view to the aggregation views. |
attachAppointmentCreate |
Attaches event handler When called, the context of the event handler (its Fired if an appointment is created. |
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 when an appointment is resized. |
attachAppointmentSelect |
Attaches event handler When called, the context of the event handler (its Fired when the selected state of an appointment is changed. |
attachCellPress |
Attaches event handler When called, the context of the event handler (its Fired when a grid cell is pressed. |
attachHeaderDateSelect |
Attaches event handler When called, the context of the event handler (its Fired if a date is selected in the calendar header. |
attachMoreLinkPress |
Attaches event handler When called, the context of the event handler (its Fired when a 'more' button is pressed. Note: The 'more' button appears in a month view cell when multiple appointments exist and the available space is not sufficient to display all of them. |
attachStartDateChange |
Attaches event handler When called, the context of the event handler (its
|
attachViewChange |
Attaches event handler When called, the context of the event handler (its The view was changed by user interaction. |
destroyActions |
Destroys all the actions in the aggregation actions. |
destroyAppointments |
Destroys all the appointments in the aggregation appointments. |
destroySpecialDates |
Destroys all the specialDates in the aggregation specialDates. |
destroyViews |
Destroys all the views in the aggregation views. |
detachAppointmentCreate |
Detaches event handler 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. |
detachAppointmentSelect |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachCellPress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachHeaderDateSelect |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachMoreLinkPress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachStartDateChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachViewChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.SinglePlanningCalendar.extend |
Creates a new subclass of class sap.m.SinglePlanningCalendar with name
|
fireAppointmentCreate |
Fires event appointmentCreate to attached listeners. |
fireAppointmentDrop |
Fires event appointmentDrop to attached listeners. |
fireAppointmentResize |
Fires event appointmentResize to attached listeners. |
fireAppointmentSelect |
Fires event appointmentSelect to attached listeners. |
fireCellPress |
Fires event cellPress to attached listeners. |
fireHeaderDateSelect |
Fires event headerDateSelect to attached listeners. |
fireMoreLinkPress |
Fires event moreLinkPress to attached listeners. |
fireStartDateChange |
Fires event startDateChange to attached listeners. |
fireViewChange |
Fires event viewChange to attached listeners. |
getActions |
Gets content of aggregation actions. The controls to be passed to the toolbar. |
getAppointments |
Gets content of aggregation appointments. The appointments to be displayed in the grid. Appointments outside the visible time frame are not rendered. Appointments, longer than a day, will be displayed in all of the affected days. To display an all-day appointment, the appointment must start at 00:00 and end on any day in the future in 00:00h. Note: The |
getEnableAppointmentsCreate |
Gets current value of property enableAppointmentsCreate. Determines whether the appointments can be created by dragging on empty cells. See enableAppointmentsResize for the specific points for events snapping Default value is |
getEnableAppointmentsDragAndDrop |
Gets current value of property enableAppointmentsDragAndDrop. Determines whether the appointments in the grid are draggable. The drag and drop interaction is visualized by a placeholder highlighting the area where the appointment can be dropped by the user. Default value is |
getEnableAppointmentsResize |
Gets current value of property enableAppointmentsResize. Determines whether the appointments are resizable. The resize interaction is visualized by making the appointment transparent. The appointment snaps on every interval of 30 minutes. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects. Default value is |
getEndHour |
Gets current value of property endHour. Determines the end hour of the grid to be shown if the Default value is |
getFullDay |
Gets current value of property fullDay. Determines if all of the hours in a day are displayed. If set to Default value is |
getLegend |
ID of the element which is the current target of the association legend, or |
sap.m.SinglePlanningCalendar.getMetadata |
Returns a metadata object for class sap.m.SinglePlanningCalendar. |
getSelectedAppointments |
Holds the selected appointments. If no appointments are selected, an empty array is returned. |
getSelectedView |
ID of the element which is the current target of the association selectedView, or |
getSpecialDates |
Gets content of aggregation specialDates. Special days in the header visualized as a date range with type. Note: If one day is assigned to more than one type, only the first type is used. |
getStartDate |
Gets current value of property startDate. Determines the start date of the grid, as a JavaScript date object. It is considered as a local date. The time part will be ignored. The current date is used as default. |
getStartHour |
Gets current value of property startHour. Determines the start hour of the grid to be shown if the Default value is |
getStickyMode |
Gets current value of property stickyMode. Determines which part of the control will remain fixed at the top of the page during vertical scrolling as long as the control is in the viewport. Note: Limited browser support. Browsers which do not support this feature:
Default value is |
getTitle |
Gets current value of property title. Determines the title of the Default value is |
getViewByKey |
Finds the view object by given key |
getViews |
Gets content of aggregation views. Views of the Note: If not set, the Week view is available. |
indexOfAction |
Checks for the provided |
indexOfAppointment |
Checks for the provided |
indexOfSpecialDate |
Checks for the provided |
indexOfView |
Checks for the provided |
insertAction |
Inserts a action into the aggregation actions. |
insertAppointment |
Inserts a appointment into the aggregation appointments. |
insertSpecialDate |
Inserts a specialDate into the aggregation specialDates. |
insertView |
Inserts a view into the aggregation views. |
removeAction |
Removes a action from the aggregation actions. |
removeAllActions |
Removes all the controls from the aggregation actions. Additionally, it unregisters them from the hosting UIArea. |
removeAllAppointments |
Removes all the controls from the aggregation appointments. Additionally, it unregisters them from the hosting UIArea. |
removeAllSpecialDates |
Removes all the controls from the aggregation specialDates. Additionally, it unregisters them from the hosting UIArea. |
removeAllViews |
Removes all the controls from the aggregation views. Additionally, it unregisters them from the hosting UIArea. |
removeAppointment |
Removes a appointment from the aggregation appointments. |
removeSpecialDate |
Removes a specialDate from the aggregation specialDates. |
removeView |
Removes a view from the aggregation views. |
setEnableAppointmentsCreate |
Sets a new value for property enableAppointmentsCreate. Determines whether the appointments can be created by dragging on empty cells. See enableAppointmentsResize for the specific points for events snapping When called with a value of Default value is |
setEnableAppointmentsDragAndDrop |
Sets a new value for property enableAppointmentsDragAndDrop. Determines whether the appointments in the grid are draggable. The drag and drop interaction is visualized by a placeholder highlighting the area where the appointment can be dropped by the user. When called with a value of Default value is |
setEnableAppointmentsResize |
Sets a new value for property enableAppointmentsResize. Determines whether the appointments are resizable. The resize interaction is visualized by making the appointment transparent. The appointment snaps on every interval of 30 minutes. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects. When called with a value of Default value is |
setEndHour |
Sets a new value for property endHour. Determines the end hour of the grid to be shown if the When called with a value of Default value is |
setFullDay |
Sets a new value for property fullDay. Determines if all of the hours in a day are displayed. If set to When called with a value of Default value is |
setLegend |
Sets the associated legend. |
setSelectedView |
Sets the associated selectedView. |
setStartDate |
Sets a new value for property startDate. Determines the start date of the grid, as a JavaScript date object. It is considered as a local date. The time part will be ignored. The current date is used as default. When called with a value of |
setStartHour |
Sets a new value for property startHour. Determines the start hour of the grid to be shown if the When called with a value of Default value is |
setStickyMode |
Sets a new value for property stickyMode. Determines which part of the control will remain fixed at the top of the page during vertical scrolling as long as the control is in the viewport. Note: Limited browser support. Browsers which do not support this feature:
When called with a value of Default value is |
setTitle |
Sets a new value for property title. Determines the title of the When called with a value of Default value is |
Adds some action to the aggregation actions.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAction | sap.ui.core.Control |
The action to add; if empty, nothing is inserted |
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 specialDate to the aggregation specialDates.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSpecialDate | sap.ui.unified.DateTypeRange |
The specialDate to add; if empty, nothing is inserted |
Adds some view to the aggregation views.
Param | Type | DefaultValue | Description |
---|---|---|---|
oView | sap.m.SinglePlanningCalendarView |
The view to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the appointmentCreate event of this sap.m.SinglePlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.SinglePlanningCalendar
itself.
Fired if an appointment is created.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the appointmentDrop event of this sap.m.SinglePlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.SinglePlanningCalendar
itself.
Fired if an appointment is dropped.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the appointmentResize event of this sap.m.SinglePlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.SinglePlanningCalendar
itself.
Fired when an appointment is resized.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the appointmentSelect event of this sap.m.SinglePlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.SinglePlanningCalendar
itself.
Fired when the selected state of an appointment is changed.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the cellPress event of this sap.m.SinglePlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.SinglePlanningCalendar
itself.
Fired when a grid cell is pressed.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the headerDateSelect event of this sap.m.SinglePlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.SinglePlanningCalendar
itself.
Fired if a date is selected in the calendar header.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the moreLinkPress event of this sap.m.SinglePlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.SinglePlanningCalendar
itself.
Fired when a 'more' button is pressed. Note: The 'more' button appears in a month view cell when multiple appointments exist and the available space is not sufficient to display all of them.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the startDateChange event of this sap.m.SinglePlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.SinglePlanningCalendar
itself.
startDate
is changed while navigating in the SinglePlanningCalendar
.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the viewChange event of this sap.m.SinglePlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.SinglePlanningCalendar
itself.
The view was changed by user interaction.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Detaches event handler fnFunction
from the appointmentCreate event of this sap.m.SinglePlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the appointmentDrop event of this sap.m.SinglePlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the appointmentResize event of this sap.m.SinglePlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the appointmentSelect event of this sap.m.SinglePlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the cellPress event of this sap.m.SinglePlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the headerDateSelect event of this sap.m.SinglePlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the moreLinkPress event of this sap.m.SinglePlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the startDateChange event of this sap.m.SinglePlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the viewChange event of this sap.m.SinglePlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Creates a new subclass of class sap.m.SinglePlanningCalendar with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
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. |
Fires event appointmentDrop to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
appointment | sap.ui.unified.CalendarAppointment |
The dropped appointment. |
|
startDate | object |
Start date of the dropped appointment, as a JavaScript date object. |
|
endDate | object |
Dropped appointment end date as a JavaScript date object. |
|
copy | boolean |
The drop type. If true - it's "Copy", if false - it's "Move". |
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. |
Fires event appointmentSelect to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
appointment | sap.ui.unified.CalendarAppointment |
The appointment on which the event was triggered. |
|
appointments | sap.ui.unified.CalendarAppointment[] |
All appointments with changed selected state. |
Fires event cellPress to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
startDate | object |
The start date as a JavaScript date object of the focused grid cell. |
|
endDate | object |
The end date as a JavaScript date object of the focused grid cell. |
Fires event headerDateSelect to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
date | object |
Date of the selected header, as a JavaScript date object. It is considered as a local date. |
Fires event moreLinkPress to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
date | object |
The date as a JavaScript date object of the cell with the pressed more link. |
Fires event startDateChange to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
date | object |
The new start date, as a JavaScript date object. It is considered as a local date. |
Fires event viewChange to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Gets content of aggregation appointments.
The appointments to be displayed in the grid. Appointments outside the visible time frame are not rendered. Appointments, longer than a day, will be displayed in all of the affected days. To display an all-day appointment, the appointment must start at 00:00 and end on any day in the future in 00:00h.
Note: The customContent
functionality of the CalendarAppointment
is not available in the SinglePlanningCalendar
. If set, it will not make any effect.
Gets current value of property enableAppointmentsCreate.
Determines whether the appointments can be created by dragging on empty cells.
See enableAppointmentsResize for the specific points for events snapping
Default value is false
.
Gets current value of property enableAppointmentsDragAndDrop.
Determines whether the appointments in the grid are draggable.
The drag and drop interaction is visualized by a placeholder highlighting the area where the appointment can be dropped by the user.
Default value is false
.
Gets current value of property enableAppointmentsResize.
Determines whether the appointments are resizable.
The resize interaction is visualized by making the appointment transparent.
The appointment snaps on every interval of 30 minutes. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects.
Default value is false
.
Gets current value of property endHour.
Determines the end hour of the grid to be shown if the fullDay
property is set to false
. Otherwise the next hours are displayed as non-working. The passed hour is considered as 24-hour based.
Default value is 24
.
Gets current value of property fullDay.
Determines if all of the hours in a day are displayed. If set to false
, the hours shown are between the startHour
and endHour
.
Default value is true
.
Returns a metadata object for class sap.m.SinglePlanningCalendar.
Holds the selected appointments. If no appointments are selected, an empty array is returned.
ID of the element which is the current target of the association selectedView, or null
.
Gets content of aggregation specialDates.
Special days in the header visualized as a date range with type.
Note: If one day is assigned to more than one type, only the first type is used.
Gets current value of property startDate.
Determines the start date of the grid, as a JavaScript date object. It is considered as a local date. The time part will be ignored. The current date is used as default.
Gets current value of property startHour.
Determines the start hour of the grid to be shown if the fullDay
property is set to false
. Otherwise the previous hours are displayed as non-working. The passed hour is considered as 24-hour based.
Default value is 0
.
Gets current value of property stickyMode.
Determines which part of the control will remain fixed at the top of the page during vertical scrolling as long as the control is in the viewport.
Note: Limited browser support. Browsers which do not support this feature:
Default value is None
.
Gets current value of property title.
Determines the title of the SinglePlanningCalendar
.
Default value is empty string
.
Finds the view object by given key
Param | Type | DefaultValue | Description |
---|---|---|---|
sKey | string |
The key of the view |
Gets content of aggregation views.
Views of the SinglePlanningCalendar
.
Note: If not set, the Week view is available.
Checks for the provided sap.ui.core.Control
in the aggregation actions. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAction | sap.ui.core.Control |
The action whose index is looked for |
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.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 |
Checks for the provided sap.m.SinglePlanningCalendarView
in the aggregation views. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oView | sap.m.SinglePlanningCalendarView |
The view whose index is looked for |
Inserts a action into the aggregation actions.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAction | sap.ui.core.Control |
The action to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
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 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 |
Inserts a view into the aggregation views.
Param | Type | DefaultValue | Description |
---|---|---|---|
oView | sap.m.SinglePlanningCalendarView |
The view to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes a action from the aggregation actions.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAction | int string sap.ui.core.Control |
The action to remove or its index or id |
Removes all the controls from the aggregation actions.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation appointments.
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 all the controls from the aggregation views.
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 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 |
Removes a view from the aggregation views.
Param | Type | DefaultValue | Description |
---|---|---|---|
vView | int string sap.m.SinglePlanningCalendarView |
The view to remove or its index or id |
Sets a new value for property enableAppointmentsCreate.
Determines whether the appointments can be created by dragging on empty cells.
See enableAppointmentsResize for the specific points for events snapping
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEnableAppointmentsCreate | boolean | false |
New value for property |
Sets a new value for property enableAppointmentsDragAndDrop.
Determines whether the appointments in the grid are draggable.
The drag and drop interaction is visualized by a placeholder highlighting the area where the appointment can be dropped by the user.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEnableAppointmentsDragAndDrop | boolean | false |
New value for property |
Sets a new value for property enableAppointmentsResize.
Determines whether the appointments are resizable.
The resize interaction is visualized by making the appointment transparent.
The appointment snaps on every interval of 30 minutes. After the resize is finished, the appointmentResize event is fired, containing the new start and end JavaScript date objects.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEnableAppointmentsResize | boolean | false |
New value for property |
Sets a new value for property endHour.
Determines the end hour of the grid to be shown if the fullDay
property is set to false
. Otherwise the next hours are displayed as non-working. The passed hour is considered as 24-hour based.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 24
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iEndHour | int | 24 |
New value for property |
Sets a new value for property fullDay.
Determines if all of the hours in a day are displayed. If set to false
, the hours shown are between the startHour
and endHour
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bFullDay | boolean | true |
New value for property |
Sets the associated legend.
Param | Type | DefaultValue | Description |
---|---|---|---|
oLegend | sap.ui.core.ID sap.m.PlanningCalendarLegend |
ID of an element which becomes the new target of this legend association; alternatively, an element instance may be given |
Sets the associated selectedView.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectedView | sap.ui.core.ID sap.m.SinglePlanningCalendarView |
ID of an element which becomes the new target of this selectedView association; alternatively, an element instance may be given |
Sets a new value for property startDate.
Determines the start date of the grid, as a JavaScript date object. It is considered as a local date. The time part will be ignored. The current date is used as default.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oStartDate | object |
New value for property |
Sets a new value for property startHour.
Determines the start hour of the grid to be shown if the fullDay
property is set to false
. Otherwise the previous hours are displayed as non-working. The passed hour is considered as 24-hour based.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iStartHour | int | 0 |
New value for property |
Sets a new value for property stickyMode.
Determines which part of the control will remain fixed at the top of the page during vertical scrolling as long as the control is in the viewport.
Note: Limited browser support. Browsers which do not support this feature:
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is None
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sStickyMode | sap.m.PlanningCalendarStickyMode | None |
New value for property |
Sets a new value for property title.
Determines the title of the SinglePlanningCalendar
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTitle | string | "" |
New value for property |