Calendar with granularity of time items displayed in one line.
Constructor for a new CalendarTimeInterval
.
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.CalendarTimeInterval(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 |
---|---|---|---|
_currentPicker | string | timesRow | Holds a reference to the currently shown picker. Possible values: timesRow, datesRow, monthPicker and yearPicker. |
intervalMinutes | int | 60 | Size of on time interval in minutes, default is 60 minutes. Note: the start of the interval calculation is always on the corresponding date at 00:00. 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. Default is 12. Note: On phones, the maximum number of items displayed in the row is always 6. Visibility: public |
maxDate | object | Maximum date that can be shown and selected in the Calendar. This must be a JavaScript date object. Note: If the |
|
minDate | object | Minimum date that can be shown and selected in the Calendar. This must be a JavaScript date object. Note: If the |
|
pickerPopup | boolean | false | If set, the day-, month- and yearPicker opens on a popup |
singleSelection | boolean | true | If set, only a single date or interval, if Note: Selection of multiple intervals is not supported in the current version. Visibility: public |
startDate | object | Start date of the Interval as JavaScript Date object. The time interval corresponding to this Date and |
|
width | sap.ui.core.CSSSize | Width of the |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
datesRow | 0..1 | sap.ui.unified.calendar.Month | |
header | 0..1 | sap.ui.unified.calendar.Header |
Hidden, for internal use only. |
monthPicker | 0..1 | sap.ui.unified.calendar.MonthPicker | |
selectedDates | 0..n | sap.ui.unified.DateRange |
Date ranges for selected items of the If |
specialDates | 0..n | sap.ui.unified.DateTypeRange |
Date ranges with type to visualize special items in the |
timesRow | 0..1 | sap.ui.unified.calendar.TimesRow | |
yearPicker | 0..1 | sap.ui.unified.calendar.YearPicker |
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. |
Event | Description |
---|---|
cancel |
Time selection was cancelled |
select |
Time selection changed |
startDateChange |
|
Time selection was cancelled
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
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. |
attachCancel |
Attaches event handler When called, the context of the event handler (its Time selection was cancelled |
attachSelect |
Attaches event handler When called, the context of the event handler (its Time selection changed |
attachStartDateChange |
Attaches event handler When called, the context of the event handler (its
|
destroySelectedDates |
Destroys all the selectedDates in the aggregation selectedDates. |
destroySpecialDates |
Destroys all the specialDates in the aggregation specialDates. |
detachCancel |
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. |
detachStartDateChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
displayDate |
Displays an item in the |
sap.ui.unified.CalendarTimeInterval.extend |
Creates a new subclass of class sap.ui.unified.CalendarTimeInterval with name
|
fireCancel |
Fires event cancel to attached listeners. |
fireSelect |
Fires event select to attached listeners. |
fireStartDateChange |
Fires event startDateChange to attached listeners. |
focusDate |
Sets the focused item of the |
getAriaLabelledBy |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy. |
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 on the corresponding date at 00:00. 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 is 12. Note: On phones, the maximum number of items displayed in the row is always 6. Default value is |
getLegend |
ID of the element which is the current target of the association legend, or |
getMaxDate |
Gets current value of property maxDate. Maximum date that can be shown and selected in the Calendar. This must be a JavaScript date object. Note: If the |
sap.ui.unified.CalendarTimeInterval.getMetadata |
Returns a metadata object for class sap.ui.unified.CalendarTimeInterval. |
getMinDate |
Gets current value of property minDate. Minimum date that can be shown and selected in the Calendar. This must be a JavaScript date object. Note: If the |
getPickerPopup |
Gets current value of property pickerPopup. If set, the day-, month- and yearPicker opens on a popup Default value is |
getSelectedDates |
Gets content of aggregation selectedDates. Date ranges for selected items of the If |
getSingleSelection |
Gets current value of property singleSelection. If set, only a single date or interval, if 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 items in the |
getStartDate |
Gets current value of property startDate. Start date of the Interval as JavaScript Date object. The time interval corresponding to this Date and |
getWidth |
Gets current value of property width. Width of the |
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. |
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 on the corresponding date at 00:00. 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. Default is 12. Note: On phones, the maximum number of items displayed in the row is always 6. When called with a value of Default value is |
setLegend |
Sets the associated legend. |
setMaxDate |
Sets a new value for property maxDate. Maximum date that can be shown and selected in the Calendar. This must be a JavaScript date object. Note: If the When called with a value of |
setMinDate |
Sets a new value for property minDate. Minimum date that can be shown and selected in the Calendar. This must be a JavaScript date object. Note: If the When called with a value of |
setPickerPopup |
Sets a new value for property pickerPopup. If set, the day-, month- and yearPicker opens on a popup When called with a value of Default value is |
setSingleSelection |
Sets a new value for property singleSelection. If set, only a single date or interval, if 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 of the Interval as JavaScript Date object. The time interval corresponding to this Date and When called with a value of |
setWidth |
Sets a new value for property width. Width of the 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 cancel event of this sap.ui.unified.CalendarTimeInterval
.
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.CalendarTimeInterval
itself.
Time selection was cancelled
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.CalendarTimeInterval
.
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.CalendarTimeInterval
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 |
Attaches event handler fnFunction
to the startDateChange event of this sap.ui.unified.CalendarTimeInterval
.
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.CalendarTimeInterval
itself.
startDate
was changed while navigation in CalendarTimeInterval
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 cancel event of this sap.ui.unified.CalendarTimeInterval
.
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.CalendarTimeInterval
.
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.ui.unified.CalendarTimeInterval
.
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 an item in the CalendarTimeInterval
but doesn't set the focus.
Param | Type | DefaultValue | Description |
---|---|---|---|
oDate | object |
JavaScript date object for displayed item. |
Creates a new subclass of class sap.ui.unified.CalendarTimeInterval 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 cancel to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event select to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event startDateChange to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Sets the focused item of the CalendarTimeInterval
.
Param | Type | DefaultValue | Description |
---|---|---|---|
oDate | object |
JavaScript date object for focused item. |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
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 on the corresponding date at 00:00.
An interval longer than 720 minutes is not allowed. Please use the CalendarDateInterval
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
.
Gets current value of property items.
Number of time items displayed. Default is 12.
Note: On phones, the maximum number of items displayed in the row is always 6.
Default value is 12
.
Gets current value of property maxDate.
Maximum date that can be shown and selected in the Calendar. 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
.
Returns a metadata object for class sap.ui.unified.CalendarTimeInterval.
Gets current value of property minDate.
Minimum date that can be shown and selected in the Calendar. 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
.
Gets current value of property pickerPopup.
If set, the day-, month- and yearPicker opens on a popup
Default value is false
.
Gets content of aggregation selectedDates.
Date ranges for selected items of the CalendarTimeInterval
.
If singleSelection
is set, only the first entry is used.
Gets current value of property singleSelection.
If set, only a single date 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 items in the CalendarTimeInterval
. If one interval is assigned to more than one type, only the first one will be used.
Gets current value of property startDate.
Start date of the Interval as JavaScript Date object. The time interval corresponding to this Date and items
and intervalMinutes
will be the first time in the displayed row.
Gets current value of property width.
Width of the CalendarTimeInterval
. The width of the single months depends on this width.
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 intervalMinutes.
Size of on time interval in minutes, default is 60 minutes.
Note: the start of the interval calculation is always on the corresponding date at 00:00.
An interval longer than 720 minutes is not allowed. Please use the CalendarDateInterval
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. Default is 12.
Note: On phones, the maximum number of items displayed in the row is always 6.
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 maxDate.
Maximum date that can be shown and selected in the Calendar. 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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMaxDate | object |
New value for property |
Sets a new value for property minDate.
Minimum date that can be shown and selected in the Calendar. 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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMinDate | object |
New value for property |
Sets a new value for property pickerPopup.
If set, the day-, month- and yearPicker opens on a popup
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 |
---|---|---|---|
bPickerPopup | boolean | false |
New value for property |
Sets a new value for property singleSelection.
If set, only a single date 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 of the Interval as JavaScript Date object. The time interval corresponding to this Date and items
and intervalMinutes
will be the first time in the displayed 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 |
Sets a new value for property width.
Width of the CalendarTimeInterval
. The width of the single months depends on this width.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sWidth | sap.ui.core.CSSSize |
New value for property |