Renders a row of time items using ItemNavigation. There is no paging or navigation outside the rendered area implemented. This is done inside the CalendarTimeInterval. If used inside the CalendarTimeInterval the properties and aggregation are directly taken from the parent (to not duplicate and synchronize DateRanges and so on...).
The TimesRow works with JavaScript Date objects.
Constructor for a new TimesRow
. It shows a calendar with time granularity (normally hours)
Note: This is used inside the CalendarTimeInterval, not for standalone usage.
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.ui.unified.calendar.TimesRow(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 |
---|---|---|---|
date | object | 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 |
|
intervalMinutes | int | 60 | Size of on time interval in minutes, default is 60 minutes. Note: the start of the interval calculation is always An interval longer than 720 minutes is not allowed. Please use the A day must be divisible by this interval size. One interval must not include more than one day. Visibility: public |
intervalSelection | boolean | false | If set, interval selection is allowed Visibility: public |
items | int | 12 | Number of time items displayed Visibility: public |
showHeader | boolean | false | If set, a header with the years is shown to visualize what month belongs to what year. Visibility: public |
singleSelection | boolean | true | 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. Visibility: public |
startDate | object | Start date, as JavaScript Date object, of the row. Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
selectedDates | 0..n | sap.ui.unified.DateRange |
Date ranges for selected dates. If |
specialDates | 0..n | sap.ui.unified.DateTypeRange |
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. |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaLabelledBy | 0..n | sap.ui.core.Control |
Association to controls / IDs which label this control (see WAI-ARIA attribute aria-labelledby). |
legend | 0..1 | sap.ui.unified.CalendarLegend |
Association to the Note The legend does not have to be rendered but must exist, and all required types must be assigned. |
Time focus changed
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
date | object |
date, as JavaScript Date object, of the focused time. |
notVisible | boolean |
If set, the focused date is not rendered yet. (This happens by navigating out of the visible area.) |
Method | Description |
---|---|
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
addSelectedDate |
Adds some selectedDate to the aggregation selectedDates. |
addSpecialDate |
Adds some specialDate to the aggregation specialDates. |
attachFocus |
Attaches event handler When called, the context of the event handler (its Time focus changed |
attachSelect |
Attaches event handler When called, the context of the event handler (its Time selection changed |
checkDateFocusable |
Checks if a date is focusable in the current rendered output. This means that if it is not rendered, it is not focusable. |
destroySelectedDates |
Destroys all the selectedDates in the aggregation selectedDates. |
destroySpecialDates |
Destroys all the specialDates in the aggregation specialDates. |
detachFocus |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSelect |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
displayDate |
Displays the given date without setting the focus |
sap.ui.unified.calendar.TimesRow.extend |
Creates a new subclass of class sap.ui.unified.calendar.TimesRow with name
|
fireFocus |
Fires event focus to attached listeners. |
fireSelect |
Fires event select to attached listeners. |
getAriaLabelledBy |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy. |
getDate |
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 |
getIntervalMinutes |
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 An interval longer than 720 minutes is not allowed. Please use the A day must be divisible by this interval size. One interval must not include more than one day. Default value is |
getIntervalSelection |
Gets current value of property intervalSelection. If set, interval selection is allowed Default value is |
getItems |
Gets current value of property items. Number of time items displayed Default value is |
getLegend |
ID of the element which is the current target of the association legend, or |
sap.ui.unified.calendar.TimesRow.getMetadata |
Returns a metadata object for class sap.ui.unified.calendar.TimesRow. |
getSelectedDates |
Gets content of aggregation selectedDates. Date ranges for selected dates. If |
getShowHeader |
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 |
getSingleSelection |
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 |
getSpecialDates |
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. |
getStartDate |
Gets current value of property startDate. Start date, as JavaScript Date object, of the row. |
indexOfSelectedDate |
Checks for the provided |
indexOfSpecialDate |
Checks for the provided |
insertSelectedDate |
Inserts a selectedDate into the aggregation selectedDates. |
insertSpecialDate |
Inserts a specialDate into the aggregation specialDates. |
removeAllAriaLabelledBy |
Removes all the controls in the association named ariaLabelledBy. |
removeAllSelectedDates |
Removes all the controls from the aggregation selectedDates. 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. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
removeSelectedDate |
Removes a selectedDate from the aggregation selectedDates. |
removeSpecialDate |
Removes a specialDate from the aggregation specialDates. |
setDate |
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 When called with a value of |
setIntervalMinutes |
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 An interval longer than 720 minutes is not allowed. Please use the A day must be divisible by this interval size. One interval must not include more than one day. When called with a value of Default value is |
setIntervalSelection |
Sets a new value for property intervalSelection. If set, interval selection is allowed When called with a value of Default value is |
setItems |
Sets a new value for property items. Number of time items displayed When called with a value of Default value is |
setLegend |
Sets the associated legend. |
setShowHeader |
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 Default value is |
setSingleSelection |
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 Default value is |
setStartDate |
Sets a new value for property startDate. Start date, as JavaScript Date object, of the row. When called with a value of |
Adds some ariaLabelledBy into the association ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to add; if empty, nothing is inserted |
Adds some selectedDate to the aggregation selectedDates.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectedDate | sap.ui.unified.DateRange |
The selectedDate 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 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
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 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
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 |
Checks if a date is focusable in the current rendered output. This means that if it is not rendered, it is not focusable.
Param | Type | DefaultValue | Description |
---|---|---|---|
oDate | object |
JavaScript Date object for focused date. |
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.
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 select event of this sap.ui.unified.calendar.TimesRow
.
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 |
Displays the given date without setting the focus
Param | Type | DefaultValue | Description |
---|---|---|---|
oDate | object |
JavaScript Date object for focused date. |
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.
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 focus to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
date | object |
date, as JavaScript Date object, of the focused time. |
|
notVisible | boolean |
If set, the focused date is not rendered yet. (This happens by navigating out of the visible area.) |
Fires event select to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
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.
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.
An interval longer than 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
.
Gets current value of property intervalSelection.
If set, interval selection is allowed
Default value is false
.
Returns a metadata object for class sap.ui.unified.calendar.TimesRow.
Gets content of aggregation selectedDates.
Date ranges for selected dates. If singleSelection
is set, only the first entry is used.
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
.
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
.
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.
Gets current value of property startDate.
Start date, as JavaScript Date object, of the row.
Checks for the provided sap.ui.unified.DateRange
in the aggregation selectedDates. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectedDate | sap.ui.unified.DateRange |
The selectedDate 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 selectedDate into the aggregation selectedDates.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectedDate | sap.ui.unified.DateRange |
The selectedDate 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 selectedDates.
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 an ariaLabelledBy from the association named ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to be removed or its index or ID |
Removes a selectedDate from the aggregation selectedDates.
Param | Type | DefaultValue | Description |
---|---|---|---|
vSelectedDate | int string sap.ui.unified.DateRange |
The selectedDate 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 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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oDate | object |
New value for property |
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.
An interval longer than 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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iIntervalMinutes | int | 60 |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bIntervalSelection | boolean | false |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iItems | int | 12 |
New value for property |
Sets the associated legend.
Param | Type | DefaultValue | Description |
---|---|---|---|
oLegend | sap.ui.core.ID sap.ui.unified.CalendarLegend |
ID of an element which becomes the new target of this legend association; alternatively, an element instance may be given |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowHeader | boolean | false |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bSingleSelection | boolean | true |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oStartDate | object |
New value for property |