renders a calendar header
The calendar header consists of 3 buttons where the text can be set and a previous and a next button. In the normal calendar the first button contains the displayed day, the second button the displayed month and the third button the displayed year.
Note: This is used inside the calendar. Not for standalone usage
Constructor for a new Header.
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.Header(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 |
---|---|---|---|
additionalTextButton0 | string | Additional text of the first button (normally day) |
|
additionalTextButton1 | string | Additional text of the second button (normally month) |
|
additionalTextButton2 | string | Additional text of the third button (normally year) |
|
ariaLabelButton0 | string | aria-label of the first button (normally day) |
|
ariaLabelButton1 | string | aria-label of the second button (normally month) Visibility: public |
|
ariaLabelButton2 | string | aria-label of the third button (normally year) Visibility: public |
|
enabledNext | boolean | true | Enables the Next button Visibility: public |
enabledPrevious | boolean | true | Enables the previous button Visibility: public |
textButton0 | string | Text of the first button (normally day) |
|
textButton1 | string | Text of the second button (normally month) Visibility: public |
|
textButton2 | string | Text of the third button (normally year) Visibility: public |
|
visibleButton0 | boolean | false | If set, the first button will be displayed Note: The default is set to false to be compatible to older versions |
visibleButton1 | boolean | true | If set, the second button will be displayed |
visibleButton2 | boolean | true | If set, the third button will be displayed |
visibleCurrentDateButton | boolean | false | If set, the Current date button will be displayed. |
Event | Description |
---|---|
pressButton0 |
First button pressed (normally day) |
pressButton1 |
Second button pressed (normally month) |
pressButton2 |
Third button pressed (normally year) |
pressCurrentDate |
Current date button pressed |
pressNext |
Next button pressed |
pressPrevious |
Previous button pressed |
First button pressed (normally day)
Since: 1.32.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Second button pressed (normally month)
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Third button pressed (normally year)
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Current date button pressed
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Method | Description |
---|---|
attachPressButton0 |
Attaches event handler When called, the context of the event handler (its First button pressed (normally day) |
attachPressButton1 |
Attaches event handler When called, the context of the event handler (its Second button pressed (normally month) |
attachPressButton2 |
Attaches event handler When called, the context of the event handler (its Third button pressed (normally year) |
attachPressCurrentDate |
Attaches event handler When called, the context of the event handler (its Current date button pressed |
attachPressNext |
Attaches event handler When called, the context of the event handler (its Next button pressed |
attachPressPrevious |
Attaches event handler When called, the context of the event handler (its Previous button pressed |
detachPressButton0 |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachPressButton1 |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachPressButton2 |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachPressCurrentDate |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachPressNext |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachPressPrevious |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.unified.calendar.Header.extend |
Creates a new subclass of class sap.ui.unified.calendar.Header with name
|
firePressButton0 |
Fires event pressButton0 to attached listeners. |
firePressButton1 |
Fires event pressButton1 to attached listeners. |
firePressButton2 |
Fires event pressButton2 to attached listeners. |
firePressCurrentDate |
Fires event pressCurrentDate to attached listeners. |
firePressNext |
Fires event pressNext to attached listeners. |
firePressPrevious |
Fires event pressPrevious to attached listeners. |
getAdditionalTextButton0 |
Gets current value of property additionalTextButton0. Additional text of the first button (normally day) |
getAdditionalTextButton1 |
Gets current value of property additionalTextButton1. Additional text of the second button (normally month) |
getAdditionalTextButton2 |
Gets current value of property additionalTextButton2. Additional text of the third button (normally year) |
getAriaLabelButton0 |
Gets current value of property ariaLabelButton0. aria-label of the first button (normally day) |
getAriaLabelButton1 |
Gets current value of property ariaLabelButton1. aria-label of the second button (normally month) |
getAriaLabelButton2 |
Gets current value of property ariaLabelButton2. aria-label of the third button (normally year) |
getEnabledNext |
Gets current value of property enabledNext. Enables the Next button Default value is |
getEnabledPrevious |
Gets current value of property enabledPrevious. Enables the previous button Default value is |
sap.ui.unified.calendar.Header.getMetadata |
Returns a metadata object for class sap.ui.unified.calendar.Header. |
getTextButton0 |
Gets current value of property textButton0. Text of the first button (normally day) |
getTextButton1 |
Gets current value of property textButton1. Text of the second button (normally month) |
getTextButton2 |
Gets current value of property textButton2. Text of the third button (normally year) |
getVisibleButton0 |
Gets current value of property visibleButton0. If set, the first button will be displayed Note: The default is set to false to be compatible to older versions Default value is |
getVisibleButton1 |
Gets current value of property visibleButton1. If set, the second button will be displayed Default value is |
getVisibleButton2 |
Gets current value of property visibleButton2. If set, the third button will be displayed Default value is |
getVisibleCurrentDateButton |
Gets current value of property visibleCurrentDateButton. If set, the Current date button will be displayed. Default value is |
setAdditionalTextButton0 |
Sets a new value for property additionalTextButton0. Additional text of the first button (normally day) When called with a value of |
setAdditionalTextButton1 |
Sets a new value for property additionalTextButton1. Additional text of the second button (normally month) When called with a value of |
setAdditionalTextButton2 |
Sets a new value for property additionalTextButton2. Additional text of the third button (normally year) When called with a value of |
setAriaLabelButton0 |
Sets a new value for property ariaLabelButton0. aria-label of the first button (normally day) When called with a value of |
setAriaLabelButton1 |
Sets a new value for property ariaLabelButton1. aria-label of the second button (normally month) When called with a value of |
setAriaLabelButton2 |
Sets a new value for property ariaLabelButton2. aria-label of the third button (normally year) When called with a value of |
setEnabledNext |
Sets a new value for property enabledNext. Enables the Next button When called with a value of Default value is |
setEnabledPrevious |
Sets a new value for property enabledPrevious. Enables the previous button When called with a value of Default value is |
setTextButton0 |
Sets a new value for property textButton0. Text of the first button (normally day) When called with a value of |
setTextButton1 |
Sets a new value for property textButton1. Text of the second button (normally month) When called with a value of |
setTextButton2 |
Sets a new value for property textButton2. Text of the third button (normally year) When called with a value of |
setVisibleButton0 |
Sets a new value for property visibleButton0. If set, the first button will be displayed Note: The default is set to false to be compatible to older versions When called with a value of Default value is |
setVisibleButton1 |
Sets a new value for property visibleButton1. If set, the second button will be displayed When called with a value of Default value is |
setVisibleButton2 |
Sets a new value for property visibleButton2. If set, the third button will be displayed When called with a value of Default value is |
setVisibleCurrentDateButton |
Sets a new value for property visibleCurrentDateButton. If set, the Current date button will be displayed. When called with a value of Default value is |
Attaches event handler fnFunction
to the pressButton0 event of this sap.ui.unified.calendar.Header
.
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.Header
itself.
First button pressed (normally day)
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 pressButton1 event of this sap.ui.unified.calendar.Header
.
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.Header
itself.
Second button pressed (normally month)
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 pressButton2 event of this sap.ui.unified.calendar.Header
.
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.Header
itself.
Third button pressed (normally year)
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 pressCurrentDate event of this sap.ui.unified.calendar.Header
.
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.Header
itself.
Current date button 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 pressNext event of this sap.ui.unified.calendar.Header
.
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.Header
itself.
Next button 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 pressPrevious event of this sap.ui.unified.calendar.Header
.
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.Header
itself.
Previous button 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 |
Detaches event handler fnFunction
from the pressButton0 event of this sap.ui.unified.calendar.Header
.
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 pressButton1 event of this sap.ui.unified.calendar.Header
.
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 pressButton2 event of this sap.ui.unified.calendar.Header
.
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 pressCurrentDate event of this sap.ui.unified.calendar.Header
.
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 pressNext event of this sap.ui.unified.calendar.Header
.
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 pressPrevious event of this sap.ui.unified.calendar.Header
.
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.ui.unified.calendar.Header 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 pressButton0 to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event pressButton1 to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event pressButton2 to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event pressCurrentDate to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event pressNext to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event pressPrevious to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Gets current value of property additionalTextButton0.
Additional text of the first button (normally day)
Gets current value of property additionalTextButton1.
Additional text of the second button (normally month)
Gets current value of property additionalTextButton2.
Additional text of the third button (normally year)
Gets current value of property ariaLabelButton0.
aria-label of the first button (normally day)
Gets current value of property ariaLabelButton1.
aria-label of the second button (normally month)
Gets current value of property ariaLabelButton2.
aria-label of the third button (normally year)
Gets current value of property enabledNext.
Enables the Next button
Default value is true
.
Gets current value of property enabledPrevious.
Enables the previous button
Default value is true
.
Returns a metadata object for class sap.ui.unified.calendar.Header.
Gets current value of property textButton1.
Text of the second button (normally month)
Gets current value of property visibleButton0.
If set, the first button will be displayed
Note: The default is set to false to be compatible to older versions
Default value is false
.
Gets current value of property visibleButton1.
If set, the second button will be displayed
Default value is true
.
Gets current value of property visibleButton2.
If set, the third button will be displayed
Default value is true
.
Gets current value of property visibleCurrentDateButton.
If set, the Current date button will be displayed.
Default value is false
.
Sets a new value for property additionalTextButton0.
Additional text of the first button (normally day)
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAdditionalTextButton0 | string |
New value for property |
Sets a new value for property additionalTextButton1.
Additional text of the second button (normally month)
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAdditionalTextButton1 | string |
New value for property |
Sets a new value for property additionalTextButton2.
Additional text of the third button (normally year)
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAdditionalTextButton2 | string |
New value for property |
Sets a new value for property ariaLabelButton0.
aria-label of the first button (normally day)
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAriaLabelButton0 | string |
New value for property |
Sets a new value for property ariaLabelButton1.
aria-label of the second button (normally month)
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAriaLabelButton1 | string |
New value for property |
Sets a new value for property ariaLabelButton2.
aria-label of the third button (normally year)
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAriaLabelButton2 | string |
New value for property |
Sets a new value for property enabledNext.
Enables the Next button
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 |
---|---|---|---|
bEnabledNext | boolean | true |
New value for property |
Sets a new value for property enabledPrevious.
Enables the previous button
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 |
---|---|---|---|
bEnabledPrevious | boolean | true |
New value for property |
Sets a new value for property textButton0.
Text of the first button (normally day)
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextButton0 | string |
New value for property |
Sets a new value for property textButton1.
Text of the second button (normally month)
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextButton1 | string |
New value for property |
Sets a new value for property textButton2.
Text of the third button (normally year)
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextButton2 | string |
New value for property |
Sets a new value for property visibleButton0.
If set, the first button will be displayed
Note: The default is set to false to be compatible to older versions
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 |
---|---|---|---|
bVisibleButton0 | boolean | false |
New value for property |
Sets a new value for property visibleButton1.
If set, the second button will be displayed
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 |
---|---|---|---|
bVisibleButton1 | boolean | true |
New value for property |
Sets a new value for property visibleButton2.
If set, the third button will be displayed
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 |
---|---|---|---|
bVisibleButton2 | boolean | true |
New value for property |
Sets a new value for property visibleCurrentDateButton.
If set, the Current date button will be displayed.
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 |
---|---|---|---|
bVisibleCurrentDateButton | boolean | false |
New value for property |