Class sap.ui.unified.calendar.HeaderModule: sap/ui/unified/calendar/Header

extends Control

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


Since: 1.28.0.
Constructor Summary
new sap.ui.unified.calendar.Header(sId?, mSettings?)Constructor for a new Header.
Event Summary
pressButton0(oControlEvent)First button pressed (normally day)
pressButton1(oControlEvent)Second button pressed (normally month)
pressButton2(oControlEvent)Third button pressed (normally year)
pressNext(oControlEvent)Next button pressed
pressPrevious(oControlEvent)Previous button pressed
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.unified.calendar.Header.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.unified.calendar.Header with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.unified.calendar.Header.getMetadata()Returns a metadata object for class sap.ui.unified.calendar.Header.
attachPressButton0(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the pressButton0 event of this sap.ui.unified.calendar.Header.
attachPressButton1(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the pressButton1 event of this sap.ui.unified.calendar.Header.
attachPressButton2(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the pressButton2 event of this sap.ui.unified.calendar.Header.
attachPressNext(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the pressNext event of this sap.ui.unified.calendar.Header.
attachPressPrevious(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the pressPrevious event of this sap.ui.unified.calendar.Header.
detachPressButton0(fnFunction, oListener)Detaches event handler fnFunction from the pressButton0 event of this sap.ui.unified.calendar.Header.
detachPressButton1(fnFunction, oListener)Detaches event handler fnFunction from the pressButton1 event of this sap.ui.unified.calendar.Header.
detachPressButton2(fnFunction, oListener)Detaches event handler fnFunction from the pressButton2 event of this sap.ui.unified.calendar.Header.
detachPressNext(fnFunction, oListener)Detaches event handler fnFunction from the pressNext event of this sap.ui.unified.calendar.Header.
detachPressPrevious(fnFunction, oListener)Detaches event handler fnFunction from the pressPrevious event of this sap.ui.unified.calendar.Header.
firePressButton0(mArguments?)Fires event pressButton0 to attached listeners.
firePressButton1(mArguments?)Fires event pressButton1 to attached listeners.
firePressButton2(mArguments?)Fires event pressButton2 to attached listeners.
firePressNext(mArguments?)Fires event pressNext to attached listeners.
firePressPrevious(mArguments?)Fires event pressPrevious to attached listeners.
getAdditionalTextButton0()Gets current value of property additionalTextButton0.
getAdditionalTextButton1()Gets current value of property additionalTextButton1.
getAdditionalTextButton2()Gets current value of property additionalTextButton2.
getAriaLabelButton0()Gets current value of property ariaLabelButton0.
getAriaLabelButton1()Gets current value of property ariaLabelButton1.
getAriaLabelButton2()Gets current value of property ariaLabelButton2.
getEnabledNext()Gets current value of property enabledNext.
getEnabledPrevious()Gets current value of property enabledPrevious.
getTextButton0()Gets current value of property textButton0.
getTextButton1()Gets current value of property textButton1.
getTextButton2()Gets current value of property textButton2.
getVisibleButton0()Gets current value of property visibleButton0.
getVisibleButton1()Gets current value of property visibleButton1.
getVisibleButton2()Gets current value of property visibleButton2.
setAdditionalTextButton0(sAdditionalTextButton0)Sets a new value for property additionalTextButton0.
setAdditionalTextButton1(sAdditionalTextButton1)Sets a new value for property additionalTextButton1.
setAdditionalTextButton2(sAdditionalTextButton2)Sets a new value for property additionalTextButton2.
setAriaLabelButton0(sAriaLabelButton0)Sets a new value for property ariaLabelButton0.
setAriaLabelButton1(sAriaLabelButton1)Sets a new value for property ariaLabelButton1.
setAriaLabelButton2(sAriaLabelButton2)Sets a new value for property ariaLabelButton2.
setEnabledNext(bEnabledNext)Sets a new value for property enabledNext.
setEnabledPrevious(bEnabledPrevious)Sets a new value for property enabledPrevious.
setTextButton0(sTextButton0)Sets a new value for property textButton0.
setTextButton1(sTextButton1)Sets a new value for property textButton1.
setTextButton2(sTextButton2)Sets a new value for property textButton2.
setVisibleButton0(bVisibleButton0)Sets a new value for property visibleButton0.
setVisibleButton1(bVisibleButton1)Sets a new value for property visibleButton1.
setVisibleButton2(bVisibleButton2)Sets a new value for property visibleButton2.
Constructor Detail
new sap.ui.unified.calendar.Header(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
{string}sId? ID for the new control, generated automatically if no ID is given
{object}mSettings? Initial settings for the new control
Event Detail
pressButton0(oControlEvent)
First button pressed (normally day)
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.32.0
pressButton1(oControlEvent)
Second button pressed (normally month)
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
pressButton2(oControlEvent)
Third button pressed (normally year)
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
pressNext(oControlEvent)
Next button pressed
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
pressPrevious(oControlEvent)
Previous button pressed
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.ui.unified.calendar.Header.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

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
sap.ui.unified.calendar.Header.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.unified.calendar.Header.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachPressButton0(oData?, fnFunction, oListener?): sap.ui.unified.calendar.Header
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)

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.Header itself
Since:
1.32.0
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
attachPressButton1(oData?, fnFunction, oListener?): sap.ui.unified.calendar.Header
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)

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.Header itself
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
attachPressButton2(oData?, fnFunction, oListener?): sap.ui.unified.calendar.Header
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)

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.Header itself
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
attachPressNext(oData?, fnFunction, oListener?): sap.ui.unified.calendar.Header
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

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.Header itself
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
attachPressPrevious(oData?, fnFunction, oListener?): sap.ui.unified.calendar.Header
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

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.Header itself
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
detachPressButton0(fnFunction, oListener): sap.ui.unified.calendar.Header
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.

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
Since:
1.32.0
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
detachPressButton1(fnFunction, oListener): sap.ui.unified.calendar.Header
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.

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:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
detachPressButton2(fnFunction, oListener): sap.ui.unified.calendar.Header
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.

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:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
detachPressNext(fnFunction, oListener): sap.ui.unified.calendar.Header
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.

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:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
detachPressPrevious(fnFunction, oListener): sap.ui.unified.calendar.Header
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.

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:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
firePressButton0(mArguments?): sap.ui.unified.calendar.Header
Fires event pressButton0 to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.32.0
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
firePressButton1(mArguments?): sap.ui.unified.calendar.Header
Fires event pressButton1 to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
firePressButton2(mArguments?): sap.ui.unified.calendar.Header
Fires event pressButton2 to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
firePressNext(mArguments?): sap.ui.unified.calendar.Header
Fires event pressNext to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
firePressPrevious(mArguments?): sap.ui.unified.calendar.Header
Fires event pressPrevious to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
getAdditionalTextButton0(): string
Gets current value of property additionalTextButton0.

Additional text of the first button (normally day)

Since:
1.34.0
Returns:
{string} Value of property additionalTextButton0
getAdditionalTextButton1(): string
Gets current value of property additionalTextButton1.

Additional text of the second button (normally month)

Since:
1.34.0
Returns:
{string} Value of property additionalTextButton1
getAdditionalTextButton2(): string
Gets current value of property additionalTextButton2.

Additional text of the third button (normally year)

Since:
1.34.0
Returns:
{string} Value of property additionalTextButton2
getAriaLabelButton0(): string
Gets current value of property ariaLabelButton0.

aria-label of the first button (normally day)

Since:
1.32.0
Returns:
{string} Value of property ariaLabelButton0
getAriaLabelButton1(): string
Gets current value of property ariaLabelButton1.

aria-label of the second button (normally month)

Returns:
{string} Value of property ariaLabelButton1
getAriaLabelButton2(): string
Gets current value of property ariaLabelButton2.

aria-label of the third button (normally year)

Returns:
{string} Value of property ariaLabelButton2
getEnabledNext(): boolean
Gets current value of property enabledNext.

Enables the Next button

Default value is true.

Returns:
{boolean} Value of property enabledNext
getEnabledPrevious(): boolean
Gets current value of property enabledPrevious.

Enables the previous button

Default value is true.

Returns:
{boolean} Value of property enabledPrevious
getTextButton0(): string
Gets current value of property textButton0.

Text of the first button (normally day)

Since:
1.32.0
Returns:
{string} Value of property textButton0
getTextButton1(): string
Gets current value of property textButton1.

Text of the second button (normally month)

Returns:
{string} Value of property textButton1
getTextButton2(): string
Gets current value of property textButton2.

Text of the third button (normally year)

Returns:
{string} Value of property textButton2
getVisibleButton0(): boolean
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.

Since:
1.32.0
Returns:
{boolean} Value of property visibleButton0
getVisibleButton1(): boolean
Gets current value of property visibleButton1.

If set, the second button will be displayed

Default value is true.

Since:
1.32.0
Returns:
{boolean} Value of property visibleButton1
getVisibleButton2(): boolean
Gets current value of property visibleButton2.

If set, the third button will be displayed

Default value is true.

Since:
1.32.0
Returns:
{boolean} Value of property visibleButton2
setAdditionalTextButton0(sAdditionalTextButton0): sap.ui.unified.calendar.Header
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.

Parameters:
{string}sAdditionalTextButton0 New value for property additionalTextButton0
Since:
1.34.0
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setAdditionalTextButton1(sAdditionalTextButton1): sap.ui.unified.calendar.Header
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.

Parameters:
{string}sAdditionalTextButton1 New value for property additionalTextButton1
Since:
1.34.0
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setAdditionalTextButton2(sAdditionalTextButton2): sap.ui.unified.calendar.Header
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.

Parameters:
{string}sAdditionalTextButton2 New value for property additionalTextButton2
Since:
1.34.0
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setAriaLabelButton0(sAriaLabelButton0): sap.ui.unified.calendar.Header
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.

Parameters:
{string}sAriaLabelButton0 New value for property ariaLabelButton0
Since:
1.32.0
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setAriaLabelButton1(sAriaLabelButton1): sap.ui.unified.calendar.Header
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.

Parameters:
{string}sAriaLabelButton1 New value for property ariaLabelButton1
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setAriaLabelButton2(sAriaLabelButton2): sap.ui.unified.calendar.Header
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.

Parameters:
{string}sAriaLabelButton2 New value for property ariaLabelButton2
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setEnabledNext(bEnabledNext): sap.ui.unified.calendar.Header
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.

Parameters:
{boolean}bEnabledNext New value for property enabledNext
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setEnabledPrevious(bEnabledPrevious): sap.ui.unified.calendar.Header
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.

Parameters:
{boolean}bEnabledPrevious New value for property enabledPrevious
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setTextButton0(sTextButton0): sap.ui.unified.calendar.Header
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.

Parameters:
{string}sTextButton0 New value for property textButton0
Since:
1.32.0
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setTextButton1(sTextButton1): sap.ui.unified.calendar.Header
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.

Parameters:
{string}sTextButton1 New value for property textButton1
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setTextButton2(sTextButton2): sap.ui.unified.calendar.Header
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.

Parameters:
{string}sTextButton2 New value for property textButton2
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setVisibleButton0(bVisibleButton0): sap.ui.unified.calendar.Header
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.

Parameters:
{boolean}bVisibleButton0 New value for property visibleButton0
Since:
1.32.0
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setVisibleButton1(bVisibleButton1): sap.ui.unified.calendar.Header
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.

Parameters:
{boolean}bVisibleButton1 New value for property visibleButton1
Since:
1.32.0
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining
setVisibleButton2(bVisibleButton2): sap.ui.unified.calendar.Header
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.

Parameters:
{boolean}bVisibleButton2 New value for property visibleButton2
Since:
1.32.0
Returns:
{sap.ui.unified.calendar.Header} Reference to this in order to allow method chaining