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(mParameters?)Fires event pressButton0 to attached listeners.
firePressButton1(mParameters?)Fires event pressButton1 to attached listeners.
firePressButton2(mParameters?)Fires event pressButton2 to attached listeners.
firePressNext(mParameters?)Fires event pressNext to attached listeners.
firePressPrevious(mParameters?)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:
stringsId?ID for the new control, generated automatically if no ID is given
objectmSettings?Initial settings for the new control
Event Detail
pressButton0(oControlEvent)
First button pressed (normally day)
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
Since:
1.32.0
pressButton1(oControlEvent)
Second button pressed (normally month)
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
pressButton2(oControlEvent)
Third button pressed (normally year)
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
pressNext(oControlEvent)
Next button pressed
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
pressPrevious(oControlEvent)
Previous button pressed
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated 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.MetadataMetadata 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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.calendar.Header itself
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
Since:
1.32.0
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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.calendar.Header itself
Returns:
sap.ui.unified.calendar.HeaderReference 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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.calendar.Header itself
Returns:
sap.ui.unified.calendar.HeaderReference 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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.calendar.Header itself
Returns:
sap.ui.unified.calendar.HeaderReference 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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.calendar.Header itself
Returns:
sap.ui.unified.calendar.HeaderReference 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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
Since:
1.32.0
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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.calendar.HeaderReference 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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.calendar.HeaderReference 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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.calendar.HeaderReference 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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
firePressButton0(mParameters?): sap.ui.unified.calendar.Header
Fires event pressButton0 to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
Since:
1.32.0
firePressButton1(mParameters?): sap.ui.unified.calendar.Header
Fires event pressButton1 to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
firePressButton2(mParameters?): sap.ui.unified.calendar.Header
Fires event pressButton2 to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
firePressNext(mParameters?): sap.ui.unified.calendar.Header
Fires event pressNext to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
firePressPrevious(mParameters?): sap.ui.unified.calendar.Header
Fires event pressPrevious to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
getAdditionalTextButton0(): string

Gets current value of property additionalTextButton0.

Additional text of the first button (normally day)

Returns:
stringValue of property additionalTextButton0
Since:
1.34.0
getAdditionalTextButton1(): string

Gets current value of property additionalTextButton1.

Additional text of the second button (normally month)

Returns:
stringValue of property additionalTextButton1
Since:
1.34.0
getAdditionalTextButton2(): string

Gets current value of property additionalTextButton2.

Additional text of the third button (normally year)

Returns:
stringValue of property additionalTextButton2
Since:
1.34.0
getAriaLabelButton0(): string

Gets current value of property ariaLabelButton0.

aria-label of the first button (normally day)

Returns:
stringValue of property ariaLabelButton0
Since:
1.32.0
getAriaLabelButton1(): string

Gets current value of property ariaLabelButton1.

aria-label of the second button (normally month)

Returns:
stringValue of property ariaLabelButton1
getAriaLabelButton2(): string

Gets current value of property ariaLabelButton2.

aria-label of the third button (normally year)

Returns:
stringValue of property ariaLabelButton2
getEnabledNext(): boolean

Gets current value of property enabledNext.

Enables the Next button

Default value is true.

Returns:
booleanValue of property enabledNext
getEnabledPrevious(): boolean

Gets current value of property enabledPrevious.

Enables the previous button

Default value is true.

Returns:
booleanValue of property enabledPrevious
getTextButton0(): string

Gets current value of property textButton0.

Text of the first button (normally day)

Returns:
stringValue of property textButton0
Since:
1.32.0
getTextButton1(): string

Gets current value of property textButton1.

Text of the second button (normally month)

Returns:
stringValue of property textButton1
getTextButton2(): string

Gets current value of property textButton2.

Text of the third button (normally year)

Returns:
stringValue 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.

Returns:
booleanValue of property visibleButton0
Since:
1.32.0
getVisibleButton1(): boolean

Gets current value of property visibleButton1.

If set, the second button will be displayed

Default value is true.

Returns:
booleanValue of property visibleButton1
Since:
1.32.0
getVisibleButton2(): boolean

Gets current value of property visibleButton2.

If set, the third button will be displayed

Default value is true.

Returns:
booleanValue of property visibleButton2
Since:
1.32.0
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:
stringsAdditionalTextButton0New value for property additionalTextButton0
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
Since:
1.34.0
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:
stringsAdditionalTextButton1New value for property additionalTextButton1
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
Since:
1.34.0
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:
stringsAdditionalTextButton2New value for property additionalTextButton2
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
Since:
1.34.0
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:
stringsAriaLabelButton0New value for property ariaLabelButton0
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
Since:
1.32.0
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:
stringsAriaLabelButton1New value for property ariaLabelButton1
Returns:
sap.ui.unified.calendar.HeaderReference 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:
stringsAriaLabelButton2New value for property ariaLabelButton2
Returns:
sap.ui.unified.calendar.HeaderReference 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:
booleanbEnabledNextNew value for property enabledNext
Returns:
sap.ui.unified.calendar.HeaderReference 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:
booleanbEnabledPreviousNew value for property enabledPrevious
Returns:
sap.ui.unified.calendar.HeaderReference 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:
stringsTextButton0New value for property textButton0
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
Since:
1.32.0
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:
stringsTextButton1New value for property textButton1
Returns:
sap.ui.unified.calendar.HeaderReference 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:
stringsTextButton2New value for property textButton2
Returns:
sap.ui.unified.calendar.HeaderReference 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:
booleanbVisibleButton0New value for property visibleButton0
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
Since:
1.32.0
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:
booleanbVisibleButton1New value for property visibleButton1
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
Since:
1.32.0
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:
booleanbVisibleButton2New value for property visibleButton2
Returns:
sap.ui.unified.calendar.HeaderReference to this in order to allow method chaining
Since:
1.32.0