sap.m.PlanningCalendar.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.PlanningCalendar with name
sClassName
and enriches it with the information contained in
oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
Parameters:
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
{function} | Created class / constructor function |
Returns a metadata object for class sap.m.PlanningCalendar.
Returns:
Adds some row to the aggregation rows
.
Parameters:
Returns:
Adds some specialDate to the aggregation specialDates
.
Parameters:
Returns:
Adds some toolbarContent to the aggregation toolbarContent
.
Parameters:
Returns:
Adds some view to the aggregation views
.
Parameters:
Returns:
Attaches event handler
fnFunction
to the
appointmentSelect
event of this
sap.m.PlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.PlanningCalendar
itself.
Fired if an appointment was selected
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.PlanningCalendar itself |
Returns:
Attaches event handler
fnFunction
to the
intervalSelect
event of this
sap.m.PlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.PlanningCalendar
itself.
Fired if an interval was selected in the header calendar or in the row
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.PlanningCalendar itself |
Returns:
Attaches event handler
fnFunction
to the
rowSelectionChange
event of this
sap.m.PlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.PlanningCalendar
itself.
Fires when row selection is changed
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.PlanningCalendar itself |
Returns:
Attaches event handler
fnFunction
to the
startDateChange
event of this
sap.m.PlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.PlanningCalendar
itself.
startDate
was changed while navigating in PlanningCalendar
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.PlanningCalendar itself |
Returns:
Attaches event handler
fnFunction
to the
viewChange
event of this
sap.m.PlanningCalendar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.PlanningCalendar
itself.
viewKey
was changed by user interaction
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.PlanningCalendar itself |
Returns:
Destroys all the rows in the aggregation rows
.
Returns:
Destroys all the specialDates in the aggregation specialDates
.
Returns:
Destroys all the toolbarContent in the aggregation toolbarContent
.
Returns:
Destroys all the views in the aggregation views
.
Returns:
Detaches event handler
fnFunction
from the
appointmentSelect
event of this
sap.m.PlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
intervalSelect
event of this
sap.m.PlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
rowSelectionChange
event of this
sap.m.PlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
startDateChange
event of this
sap.m.PlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
viewChange
event of this
sap.m.PlanningCalendar
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Fires event
appointmentSelect
to attached listeners.
Expects the following event parameters:
appointment
of type sap.ui.unified.CalendarAppointment
Selected appointmentappointments
of type sap.ui.unified.CalendarAppointment[]
Selected appointments in case a group appointment is selectedmultiSelect
of type boolean
If set, the appointment was selected using multiple selection (e.g. Shift + single mouse click), meaning more than the current appointment could be selected.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
intervalSelect
to attached listeners.
Expects the following event parameters:
startDate
of type object
Start date of the selected interval, as JavaScript date object.endDate
of type object
Interval end date as JavaScript date objectsubInterval
of type boolean
If set, the selected interval is a subintervalrow
of type sap.m.PlanningCalendarRow
Row of the selected interval
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
rowSelectionChange
to attached listeners.
Expects the following event parameters:
rows
of type sap.m.PlanningCalendarRow[]
Array of rows whose selection has changed.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event startDateChange
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event viewChange
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
getAppointmentsReducedHeight(): boolean
Gets current value of property
appointmentsReducedHeight
.
If set the appointments without text (only title) are rendered with a smaller height.
Note: On phone devices this property is ignored, appointments are always rendered in full height to allow touching.
Default value is false
.
- Since:
- 1.38.0
Returns:
{boolean} | Value of property appointmentsReducedHeight |
Gets current value of property
height
.
Height of the PlanningCalendar
Returns:
getMaxDate(): object
Gets current value of property
maxDate
.
Maximum date that can be shown and selected in the PlanningCalendar
. This must be a JavaScript date object.
Note: If the maxDate
is set to be before the minDate
, the minDate
is set to the begin of the month of the maxDate
.
- Since:
- 1.38.0
Returns:
{object} | Value of property maxDate |
getMinDate(): object
Gets current value of property
minDate
.
Minimum date that can be shown and selected in the PlanningCalendar
. This must be a JavaScript date object.
Note: If the minDate
is set to be after the maxDate
, the maxDate
is set to the end of the month of the minDate
.
- Since:
- 1.38.0
Returns:
{object} | Value of property minDate |
getNoDataText(): string
Gets current value of property
noDataText
.
This text is displayed when no rows are assigned.
Returns:
{string} | Value of property noDataText |
Gets content of aggregation
rows
.
rows of the PlanningCalendar
Returns:
Returns an array containing the selected rows. If no row is selected, an empty array is returned.
Returns:
getShowEmptyIntervalHeaders(): boolean
Gets current value of property
showEmptyIntervalHeaders
.
If set, interval headers are shown even if no intervalHeaders
are assigned to the visible time frame.
If not set, no interval headers are shown if no intervalHeaders
are assigned.
Note: This property is only used if showIntervalHeaders
is set to true
.
Default value is true
.
- Since:
- 1.38.0
Returns:
{boolean} | Value of property showEmptyIntervalHeaders |
getShowIntervalHeaders(): boolean
Gets current value of property
showIntervalHeaders
.
If set, interval headers are shown like specified in showEmptyIntervalHeaders
.
If not set, no interval headers are shown even if intervalHeaders
are assigned.
Default value is true
.
Returns:
{boolean} | Value of property showIntervalHeaders |
getShowRowHeaders(): boolean
Gets current value of property
showRowHeaders
.
If set, headers of the PlanningCalendarRows
are shown. This means the column with the headers is shown.
If not set, the header column is not shown at all, even if header information is provided.
Default value is true
.
Returns:
{boolean} | Value of property showRowHeaders |
getSingleSelection(): boolean
Gets current value of property
singleSelection
.
If set, only a single row can be selected
Default value is true
.
Returns:
{boolean} | Value of property singleSelection |
Gets content of aggregation
specialDates
.
Date range along with a type to visualize special days in the header calendar. If one day is assigned to more than one type, only the first one will be used.
Returns:
getStartDate(): object
Gets current value of property
startDate
.
Start date of the row, as JavaScript date object. As a default the current date is used.
Returns:
{object} | Value of property startDate |
Gets content of aggregation
toolbarContent
.
The content of the toolbar.
Returns:
getViewKey(): string
Gets current value of property
viewKey
.
Key of the PlanningCalendarView
used for the output. The default value uses a default view. If you are using own views, the keys of these views must be used instead.
Default value is sap.ui.unified.CalendarIntervalType.Hour
.
Returns:
{string} | Value of property viewKey |
Gets content of aggregation
views
.
Views of the PlanningCalendar
.
If not set, three default views are used to allow you to switch between hour, day and month granularity. The default views have the keys defined in sap.ui.unified.CalendarIntervalType
Returns:
Gets current value of property
width
.
Width of the PlanningCalendar
Returns:
indexOfRow(oRow): int
Checks for the provided sap.m.PlanningCalendarRow
in the aggregation rows
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
indexOfSpecialDate(oSpecialDate): int
Checks for the provided sap.ui.unified.DateTypeRange
in the aggregation specialDates
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
indexOfToolbarContent(oToolbarContent): int
Checks for the provided sap.ui.core.Control
in the aggregation toolbarContent
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
indexOfView(oView): int
Checks for the provided sap.m.PlanningCalendarView
in the aggregation views
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a row into the aggregation rows
.
Parameters:
{sap.m.PlanningCalendarRow} | oRow | the row to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the row should be inserted at; for a negative value of iIndex , the row is inserted at position 0; for a value greater than the current size of the aggregation, the row is inserted at the last position |
Returns:
Inserts a specialDate into the aggregation specialDates
.
Parameters:
{sap.ui.unified.DateTypeRange} | oSpecialDate | the specialDate to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the specialDate should be inserted at; for a negative value of iIndex , the specialDate is inserted at position 0; for a value greater than the current size of the aggregation, the specialDate is inserted at the last position |
Returns:
Inserts a toolbarContent into the aggregation toolbarContent
.
Parameters:
{sap.ui.core.Control} | oToolbarContent | the toolbarContent to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the toolbarContent should be inserted at; for a negative value of iIndex , the toolbarContent is inserted at position 0; for a value greater than the current size of the aggregation, the toolbarContent is inserted at the last position |
Returns:
Inserts a view into the aggregation views
.
Parameters:
{sap.m.PlanningCalendarView} | oView | the view to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the view should be inserted at; for a negative value of iIndex , the view is inserted at position 0; for a value greater than the current size of the aggregation, the view is inserted at the last position |
Returns:
Removes all the controls from the aggregation
rows
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
specialDates
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
toolbarContent
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
views
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a row from the aggregation rows
.
Parameters:
Returns:
Removes a specialDate from the aggregation specialDates
.
Parameters:
Returns:
Removes a toolbarContent from the aggregation toolbarContent
.
Parameters:
Returns:
Removes a view from the aggregation views
.
Parameters:
Returns:
Selects or deselects all
PlanningCalendarRows
.
Note: Selection only works if singleSelection
is not set
Parameters:
{boolean} | bSelect | Indicator showing whether PlanningCalendarRows should be selected or deselected |
Returns:
Sets a new value for property
appointmentsReducedHeight
.
If set the appointments without text (only title) are rendered with a smaller height.
Note: On phone devices this property is ignored, appointments are always rendered in full height to allow touching.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bAppointmentsReducedHeight | New value for property appointmentsReducedHeight |
- Since:
- 1.38.0
Returns:
Sets a new value for property
height
.
Height of the PlanningCalendar
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
Returns:
Sets a new value for property
maxDate
.
Maximum date that can be shown and selected in the PlanningCalendar
. This must be a JavaScript date object.
Note: If the maxDate
is set to be before the minDate
, the minDate
is set to the begin of the month of the maxDate
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{object} | oMaxDate | New value for property maxDate |
- Since:
- 1.38.0
Returns:
Sets a new value for property
minDate
.
Minimum date that can be shown and selected in the PlanningCalendar
. This must be a JavaScript date object.
Note: If the minDate
is set to be after the maxDate
, the maxDate
is set to the end of the month of the minDate
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{object} | oMinDate | New value for property minDate |
- Since:
- 1.38.0
Returns:
Sets a new value for property
noDataText
.
This text is displayed when no rows are assigned.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sNoDataText | New value for property noDataText |
Returns:
Sets a new value for property
showEmptyIntervalHeaders
.
If set, interval headers are shown even if no intervalHeaders
are assigned to the visible time frame.
If not set, no interval headers are shown if no intervalHeaders
are assigned.
Note: This property is only used if showIntervalHeaders
is set to true
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowEmptyIntervalHeaders | New value for property showEmptyIntervalHeaders |
- Since:
- 1.38.0
Returns:
Sets a new value for property
showIntervalHeaders
.
If set, interval headers are shown like specified in showEmptyIntervalHeaders
.
If not set, no interval headers are shown even if intervalHeaders
are assigned.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowIntervalHeaders | New value for property showIntervalHeaders |
Returns:
Sets a new value for property
showRowHeaders
.
If set, headers of the PlanningCalendarRows
are shown. This means the column with the headers is shown.
If not set, the header column is not shown at all, even if header information is provided.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowRowHeaders | New value for property showRowHeaders |
Returns:
Sets a new value for property
singleSelection
.
If set, only a single row can be selected
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bSingleSelection | New value for property singleSelection |
Returns:
Sets a new value for property
startDate
.
Start date of the row, as JavaScript date object. As a default the current date is used.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{object} | oStartDate | New value for property startDate |
Returns:
Sets a new value for property
viewKey
.
Key of the PlanningCalendarView
used for the output. The default value uses a default view. If you are using own views, the keys of these views must be used instead.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is sap.ui.unified.CalendarIntervalType.Hour
.
Parameters:
{string} | sViewKey | New value for property viewKey |
Returns:
Sets a new value for property
width
.
Width of the PlanningCalendar
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
Returns: