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.
Event Summary
pressButton0(oControlEvent)First button pressed (normally day) pressButton1(oControlEvent)Second button pressed (normally month) pressButton2(oControlEvent)Third button pressed (normally year) 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
. 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
. firePressNext(mArguments?)Fires event pressNext
to attached listeners. setEnabledNext(bEnabledNext)Sets a new value for property enabledNext
. 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
. addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
getVisible,
hasStyleClass,
invalidate,
isBusy,
onAfterRendering,
onBeforeRendering,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
setVisible,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
exit,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
init,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty 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:
- Properties
- Events
- pressPrevious : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- pressNext : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- pressButton0 : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- pressButton1 : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- pressButton2 : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
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:
- Since:
- 1.32.0
pressButton1(oControlEvent)
Second button pressed (normally month)
Parameters:
pressButton2(oControlEvent)
Third button pressed (normally year)
Parameters:
pressNext(oControlEvent)
Next button pressed
Parameters:
pressPrevious(oControlEvent)
Previous button pressed
Parameters:
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 |
Returns a metadata object for class sap.ui.unified.calendar.Header.
Returns:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
Fires event pressButton0
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.32.0
Returns:
Fires event pressButton1
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event pressButton2
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event pressNext
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event pressPrevious
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
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 |
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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: