sap.ui.unified.calendar.TimesRow.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.unified.calendar.TimesRow 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.ui.unified.calendar.TimesRow.
Returns:
Adds some ariaLabelledBy into the association ariaLabelledBy
.
Parameters:
{string|sap.ui.core.Control} | vAriaLabelledBy | the ariaLabelledBy to add; if empty, nothing is inserted |
Returns:
Adds some selectedDate to the aggregation selectedDates
.
Parameters:
Returns:
Adds some specialDate to the aggregation specialDates
.
Parameters:
Returns:
Attaches event handler
fnFunction
to the
focus
event of this
sap.ui.unified.calendar.TimesRow
.
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.ui.unified.calendar.TimesRow
itself.
Time focus 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.ui.unified.calendar.TimesRow itself |
Returns:
Attaches event handler
fnFunction
to the
select
event of this
sap.ui.unified.calendar.TimesRow
.
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.ui.unified.calendar.TimesRow
itself.
Time selection 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.ui.unified.calendar.TimesRow itself |
Returns:
checkDateFocusable(oDate): boolean
Checks if a date is focusable in the current rendered output. This means that if it is not rendered, it is not focusable.
Parameters:
{object} | oDate | JavaScript Date object for focused date. |
Returns:
{boolean} | flag if focusable |
Destroys all the selectedDates in the aggregation selectedDates
.
Returns:
Destroys all the specialDates in the aggregation specialDates
.
Returns:
Detaches event handler
fnFunction
from the
focus
event of this
sap.ui.unified.calendar.TimesRow
.
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
select
event of this
sap.ui.unified.calendar.TimesRow
.
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:
Displays the given date without setting the focus
Parameters:
{object} | oDate | JavaScript Date object for focused date. |
Returns:
Fires event
focus
to attached listeners.
Expects the following event parameters:
date
of type object
date, as JavaScript Date object, of the focused time.notVisible
of type boolean
If set, the focused date is not rendered yet. (This happens by navigating out of the visible area.)
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event select
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy
.
Returns:
getDate(): object
Gets current value of property
date
.
A date as JavaScript Date object. The month including this date is rendered and this date is focused initially (if no other focus is set). If the date property is not in the range startDate
+ items
in the rendering phase, it is set to the startDate
. So after setting the startDate
the date should be set to be in the visible range.
Returns:
{object} | Value of property date |
getIntervalMinutes(): int
Gets current value of property
intervalMinutes
.
Size of on time interval in minutes, default is 60 minutes.
Note: the start of the interval calculation is always startDat
at 00:00.
A interval longer then 720 minutes is not allowed. Please use the DatesRow
instead.
A day must be divisible by this interval size. One interval must not include more than one day.
Default value is 60
.
Returns:
{int} | Value of property intervalMinutes |
getIntervalSelection(): boolean
Gets current value of property
intervalSelection
.
If set, interval selection is allowed
Default value is false
.
Returns:
{boolean} | Value of property intervalSelection |
getItems(): int
Gets current value of property
items
.
Number of time items displayed
Default value is 12
.
Returns:
{int} | Value of property items |
ID of the element which is the current target of the association legend
, or null
.
- Since:
- 1.38.5
Returns:
Gets content of aggregation
selectedDates
.
Date ranges for selected dates. If singleSelection
is set, only the first entry is used.
Returns:
getShowHeader(): boolean
Gets current value of property
showHeader
.
If set, a header with the years is shown to visualize what month belongs to what year.
Default value is false
.
Returns:
{boolean} | Value of property showHeader |
getSingleSelection(): boolean
Gets current value of property
singleSelection
.
If set, only a single month or interval, if intervalSelection is enabled, can be selected
Note: Selection of multiple intervals is not supported in the current version.
Default value is true
.
Returns:
{boolean} | Value of property singleSelection |
Gets content of aggregation
specialDates
.
Date ranges with type to visualize special item in the row. 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, as JavaScript Date object, of the row.
Returns:
{object} | Value of property startDate |
indexOfSelectedDate(oSelectedDate): int
Checks for the provided sap.ui.unified.DateRange
in the aggregation selectedDates
. 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 |
Inserts a selectedDate into the aggregation selectedDates
.
Parameters:
{sap.ui.unified.DateRange} | oSelectedDate | the selectedDate to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the selectedDate should be inserted at; for a negative value of iIndex , the selectedDate is inserted at position 0; for a value greater than the current size of the aggregation, the selectedDate 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:
Removes all the controls in the association named ariaLabelledBy
.
Returns:
Removes all the controls from the aggregation
selectedDates
.
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 an ariaLabelledBy from the association named ariaLabelledBy
.
Parameters:
{int|string|sap.ui.core.Control} | vAriaLabelledBy | The ariaLabelledByto be removed or its index or ID |
Returns:
Removes a selectedDate from the aggregation selectedDates
.
Parameters:
Returns:
Removes a specialDate from the aggregation specialDates
.
Parameters:
Returns:
Sets a new value for property
date
.
A date as JavaScript Date object. The month including this date is rendered and this date is focused initially (if no other focus is set). If the date property is not in the range startDate
+ items
in the rendering phase, it is set to the startDate
. So after setting the startDate
the date should be set to be in the visible range.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{object} | oDate | New value for property date |
Returns:
Sets a new value for property
intervalMinutes
.
Size of on time interval in minutes, default is 60 minutes.
Note: the start of the interval calculation is always startDat
at 00:00.
A interval longer then 720 minutes is not allowed. Please use the DatesRow
instead.
A day must be divisible by this interval size. One interval must not include more than one day.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 60
.
Parameters:
{int} | iIntervalMinutes | New value for property intervalMinutes |
Returns:
Sets a new value for property
intervalSelection
.
If set, interval selection is allowed
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bIntervalSelection | New value for property intervalSelection |
Returns:
Sets a new value for property
items
.
Number of time items displayed
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 12
.
Parameters:
{int} | iItems | New value for property items |
Returns:
Sets the associated legend
.
Parameters:
{sap.ui.unified.CalendarLegend} | oLegend | Id of an element which becomes the new target of this legend association; alternatively, an element instance may be given |
- Since:
- 1.38.5
Returns:
Sets a new value for property
showHeader
.
If set, a header with the years is shown to visualize what month belongs to what year.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bShowHeader | New value for property showHeader |
Returns:
Sets a new value for property
singleSelection
.
If set, only a single month or interval, if intervalSelection is enabled, can be selected
Note: Selection of multiple intervals is not supported in the current version.
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, as JavaScript Date object, of the row.
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: