class sap.ui.unified.calendar.Month

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/unified/calendar/Month
Application Component: CA-UI5-CTR

renders a month with ItemNavigation This is used inside the calendar. Not for stand alone usage If used inside the calendar the properties and aggregation are directly taken from the parent (To not duplicate and sync DateRanges and so on...)


Constructor

Constructor for a new calendar/Month.

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.Month(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


Properties

Name Type Default Value Description
_focusedDate object

The value of this property is set trough the sap.ui.unified.Calendar control, in order for the current sap.ui.unified.calendar.Month control to know which is the focused date even if this date is out of the visible date range

Since: 1.90.

Visibility: hidden
date object

A date as JavaScript Date object. The month including this date is rendered and this date is focused initially (if no other focus is set).

Visibility: public
firstDayOfWeek int -1

If set, the first day of the displayed week is this day. Valid values are 0 to 6. If not a valid value is set, the default of the used locale is used.

Since: 1.28.9.

Visibility: public
intervalSelection boolean false

If set, interval selection is allowed

Visibility: public
nonWorkingDays int[]

If set, the provided weekdays are displayed as non-working days. Valid values inside the array are 0 to 6. If not set, the weekend defined in the locale settings is displayed as non-working days.

Since: 1.28.9.

Visibility: public
primaryCalendarType sap.ui.core.CalendarType

If set, the calendar type is used for display. If not set, the calendar type of the global configuration is used.

Since: 1.34.0.

Visibility: public
secondaryCalendarType sap.ui.core.CalendarType

If set, the days are also displayed in this calendar type If not set, the dates are only displayed in the primary calendar type

Since: 1.34.0.

Visibility: public
showHeader boolean false

If set, a header with the month name is shown

Visibility: public
showWeekNumbers boolean true

Determines whether the week numbers in the months are displayed.

Note: For Islamic calendars, the week numbers are not displayed regardless of what is set to this property.

Since: 1.48.

Visibility: public
singleSelection boolean true

If set, only a single date or interval, if intervalSelection is enabled, can be selected

Visibility: public
width sap.ui.core.CSSSize

Width of Month

Since: 1.38.0.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
disabledDates 0..n sap.ui.unified.DateRange

Date Ranges for disabled dates

Since: 1.38.0.

selectedDates 0..n sap.ui.unified.DateRange

Date Ranges for selected dates of the DatePicker

specialDates 0..n sap.ui.unified.DateTypeRange

DateRange with type to visualize special days in the Calendar.

Note: If one day is assigned to more than one DateTypeRange, only the first one will be used. The only exception is when one of the types is NonWorking, then you can have both NonWorking and the other type. For example, you can have NonWorking + Type01 but you can't have Type01 + Type02.


Associations

Name Cardinality Type Description
ariaLabelledBy 0..n sap.ui.core.Control

Association to controls / ids which label this control (see WAI-ARIA attribute aria-labelledby).

legend 0..1 sap.ui.unified.CalendarLegend

Association to the CalendarLegend explaining the colors of the specialDates.

Note The legend does not have to be rendered but must exist, and all required types must be assigned.

Since: 1.38.5.


Events Overview

Event Description
focus

Date focus changed

select

Date selection changed

weekNumberSelect

Fired when a week number selection is changed. By default, choosing the week number will select the corresponding week. If the week has already been selected, choosing the week number will deselect it.

The default behavior can be prevented using the preventDefault method.

Note: Works for Gregorian calendars only and when intervalSelection is set to true.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.60.

focus

Date focus changed

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
date object

focused date

otherMonth boolean

focused date is in an other month than the displayed one

restoreOldDate boolean

focused date is set to the same as before (date in other month clicked)

select

Date selection changed

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

weekNumberSelect

Fired when a week number selection is changed. By default, choosing the week number will select the corresponding week. If the week has already been selected, choosing the week number will deselect it.

The default behavior can be prevented using the preventDefault method.

Note: Works for Gregorian calendars only and when intervalSelection is set to true.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.60.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
weekNumber int

The selected week number.

weekDays sap.ui.unified.DateRange

The days of the corresponding week that are selected or deselected.

Note: Will be set to null if that week is being deselected.


Methods Overview

Method Description
addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

addDisabledDate

Adds some disabledDate to the aggregation disabledDates.

addSelectedDate

Adds some selectedDate to the aggregation selectedDates.

addSpecialDate

Adds some specialDate to the aggregation specialDates.

attachFocus

Attaches event handler fnFunction to the focus event of this sap.ui.unified.calendar.Month.

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.Month itself.

Date focus changed

attachSelect

Attaches event handler fnFunction to the select event of this sap.ui.unified.calendar.Month.

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.Month itself.

Date selection changed

attachWeekNumberSelect

Attaches event handler fnFunction to the weekNumberSelect event of this sap.ui.unified.calendar.Month.

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.Month itself.

Fired when a week number selection is changed. By default, choosing the week number will select the corresponding week. If the week has already been selected, choosing the week number will deselect it.

The default behavior can be prevented using the preventDefault method.

Note: Works for Gregorian calendars only and when intervalSelection is set to true.

checkDateFocusable

checks if a date is focusable in the current rendered output. So if not rendered or in other month it is not focusable.

destroyDisabledDates

Destroys all the disabledDates in the aggregation disabledDates.

destroySelectedDates

Destroys all the selectedDates in the aggregation selectedDates.

destroySpecialDates

Destroys all the specialDates in the aggregation specialDates.

detachFocus

Detaches event handler fnFunction from the focus event of this sap.ui.unified.calendar.Month.

The passed function and listener object must match the ones used for event registration.

detachSelect

Detaches event handler fnFunction from the select event of this sap.ui.unified.calendar.Month.

The passed function and listener object must match the ones used for event registration.

detachWeekNumberSelect

Detaches event handler fnFunction from the weekNumberSelect event of this sap.ui.unified.calendar.Month.

The passed function and listener object must match the ones used for event registration.

displayDate

displays the month of a given date without setting the focus

sap.ui.unified.calendar.Month.extend

Creates a new subclass of class sap.ui.unified.calendar.Month 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.

fireFocus

Fires event focus to attached listeners.

fireSelect

Fires event select to attached listeners.

fireWeekNumberSelect

Fires event weekNumberSelect to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getDate

Gets current value of property date.

A date as JavaScript Date object. The month including this date is rendered and this date is focused initially (if no other focus is set).

getDisabledDates

Gets content of aggregation disabledDates.

Date Ranges for disabled dates

getFirstDayOfWeek

Gets current value of property firstDayOfWeek.

If set, the first day of the displayed week is this day. Valid values are 0 to 6. If not a valid value is set, the default of the used locale is used.

Default value is -1.

getIntervalSelection

Gets current value of property intervalSelection.

If set, interval selection is allowed

Default value is false.

getLegend

ID of the element which is the current target of the association legend, or null.

sap.ui.unified.calendar.Month.getMetadata

Returns a metadata object for class sap.ui.unified.calendar.Month.

getNonWorkingDays

Gets current value of property nonWorkingDays.

If set, the provided weekdays are displayed as non-working days. Valid values inside the array are 0 to 6. If not set, the weekend defined in the locale settings is displayed as non-working days.

getPrimaryCalendarType

Gets current value of property primaryCalendarType.

If set, the calendar type is used for display. If not set, the calendar type of the global configuration is used.

getSecondaryCalendarType

Gets current value of property secondaryCalendarType.

If set, the days are also displayed in this calendar type If not set, the dates are only displayed in the primary calendar type

getSelectedDates

Gets content of aggregation selectedDates.

Date Ranges for selected dates of the DatePicker

getShowHeader

Gets current value of property showHeader.

If set, a header with the month name is shown

Default value is false.

getShowWeekNumbers

Gets current value of property showWeekNumbers.

Determines whether the week numbers in the months are displayed.

Note: For Islamic calendars, the week numbers are not displayed regardless of what is set to this property.

Default value is true.

getSingleSelection

Gets current value of property singleSelection.

If set, only a single date or interval, if intervalSelection is enabled, can be selected

Default value is true.

getSpecialDates

Gets content of aggregation specialDates.

DateRange with type to visualize special days in the Calendar.

Note: If one day is assigned to more than one DateTypeRange, only the first one will be used. The only exception is when one of the types is NonWorking, then you can have both NonWorking and the other type. For example, you can have NonWorking + Type01 but you can't have Type01 + Type02.

getWidth

Gets current value of property width.

Width of Month

indexOfDisabledDate

Checks for the provided sap.ui.unified.DateRange in the aggregation disabledDates. and returns its index if found or -1 otherwise.

indexOfSelectedDate

Checks for the provided sap.ui.unified.DateRange in the aggregation selectedDates. and returns its index if found or -1 otherwise.

indexOfSpecialDate

Checks for the provided sap.ui.unified.DateTypeRange in the aggregation specialDates. and returns its index if found or -1 otherwise.

insertDisabledDate

Inserts a disabledDate into the aggregation disabledDates.

insertSelectedDate

Inserts a selectedDate into the aggregation selectedDates.

insertSpecialDate

Inserts a specialDate into the aggregation specialDates.

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllDisabledDates

Removes all the controls from the aggregation disabledDates.

Additionally, it unregisters them from the hosting UIArea.

removeAllSelectedDates

Removes all the controls from the aggregation selectedDates.

Additionally, it unregisters them from the hosting UIArea.

removeAllSpecialDates

Removes all the controls from the aggregation specialDates.

Additionally, it unregisters them from the hosting UIArea.

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

removeDisabledDate

Removes a disabledDate from the aggregation disabledDates.

removeSelectedDate

Removes a selectedDate from the aggregation selectedDates.

removeSpecialDate

Removes a specialDate from the aggregation specialDates.

setDate

Sets a new value for property date.

A date as JavaScript Date object. The month including this date is rendered and this date is focused initially (if no other focus is set).

When called with a value of null or undefined, the default value of the property will be restored.

setFirstDayOfWeek

Sets a new value for property firstDayOfWeek.

If set, the first day of the displayed week is this day. Valid values are 0 to 6. If not a valid value is set, the default of the used locale is used.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is -1.

setIntervalSelection

Sets a new value for property intervalSelection.

If set, interval selection is allowed

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

setLegend

Sets the associated legend.

setNonWorkingDays

Sets a new value for property nonWorkingDays.

If set, the provided weekdays are displayed as non-working days. Valid values inside the array are 0 to 6. If not set, the weekend defined in the locale settings is displayed as non-working days.

When called with a value of null or undefined, the default value of the property will be restored.

setPrimaryCalendarType

Sets a new value for property primaryCalendarType.

If set, the calendar type is used for display. If not set, the calendar type of the global configuration is used.

When called with a value of null or undefined, the default value of the property will be restored.

setSecondaryCalendarType

Sets a new value for property secondaryCalendarType.

If set, the days are also displayed in this calendar type If not set, the dates are only displayed in the primary calendar type

When called with a value of null or undefined, the default value of the property will be restored.

setShowHeader

Sets a new value for property showHeader.

If set, a header with the month name is shown

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

setShowWeekNumbers

Sets a new value for property showWeekNumbers.

Determines whether the week numbers in the months are displayed.

Note: For Islamic calendars, the week numbers are not displayed regardless of what is set to this property.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

setSingleSelection

Sets a new value for property singleSelection.

If set, only a single date or interval, if intervalSelection is enabled, can be selected

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

setWidth

Sets a new value for property width.

Width of Month

When called with a value of null or undefined, the default value of the property will be restored.

addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to add; if empty, nothing is inserted

addDisabledDate

Adds some disabledDate to the aggregation disabledDates.

Param Type DefaultValue Description
oDisabledDate sap.ui.unified.DateRange

The disabledDate to add; if empty, nothing is inserted

addSelectedDate

Adds some selectedDate to the aggregation selectedDates.

Param Type DefaultValue Description
oSelectedDate sap.ui.unified.DateRange

The selectedDate to add; if empty, nothing is inserted

addSpecialDate

Adds some specialDate to the aggregation specialDates.

Param Type DefaultValue Description
oSpecialDate sap.ui.unified.DateTypeRange

The specialDate to add; if empty, nothing is inserted

attachFocus

Attaches event handler fnFunction to the focus event of this sap.ui.unified.calendar.Month.

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.Month itself.

Date focus changed

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.unified.calendar.Month itself

attachSelect

Attaches event handler fnFunction to the select event of this sap.ui.unified.calendar.Month.

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.Month itself.

Date selection changed

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.unified.calendar.Month itself

attachWeekNumberSelect

Attaches event handler fnFunction to the weekNumberSelect event of this sap.ui.unified.calendar.Month.

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.Month itself.

Fired when a week number selection is changed. By default, choosing the week number will select the corresponding week. If the week has already been selected, choosing the week number will deselect it.

The default behavior can be prevented using the preventDefault method.

Note: Works for Gregorian calendars only and when intervalSelection is set to true.

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 sap.ui.unified.calendar.Month itself

checkDateFocusable

checks if a date is focusable in the current rendered output. So if not rendered or in other month it is not focusable.

Param Type DefaultValue Description
oDate object

JavaScript date object for focused date.

destroyDisabledDates

Destroys all the disabledDates in the aggregation disabledDates.

destroySelectedDates

Destroys all the selectedDates in the aggregation selectedDates.

destroySpecialDates

Destroys all the specialDates in the aggregation specialDates.

detachFocus

Detaches event handler fnFunction from the focus event of this sap.ui.unified.calendar.Month.

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

detachSelect

Detaches event handler fnFunction from the select event of this sap.ui.unified.calendar.Month.

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

detachWeekNumberSelect

Detaches event handler fnFunction from the weekNumberSelect event of this sap.ui.unified.calendar.Month.

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

displayDate

displays the month of a given date without setting the focus

Param Type DefaultValue Description
oDate object

JavaScript date object for focused date.

sap.ui.unified.calendar.Month.extend

Creates a new subclass of class sap.ui.unified.calendar.Month 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

fireFocus

Fires event focus to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

date object

focused date

otherMonth boolean

focused date is in an other month than the displayed one

restoreOldDate boolean

focused date is set to the same as before (date in other month clicked)

fireSelect

Fires event select to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireWeekNumberSelect

Fires event weekNumberSelect to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

weekNumber int

The selected week number.

weekDays sap.ui.unified.DateRange

The days of the corresponding week that are selected or deselected.

Note: Will be set to null if that week is being deselected.

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getDate

Gets current value of property date.

A date as JavaScript Date object. The month including this date is rendered and this date is focused initially (if no other focus is set).

getDisabledDates

Gets content of aggregation disabledDates.

Date Ranges for disabled dates

getFirstDayOfWeek

Gets current value of property firstDayOfWeek.

If set, the first day of the displayed week is this day. Valid values are 0 to 6. If not a valid value is set, the default of the used locale is used.

Default value is -1.

getIntervalSelection

Gets current value of property intervalSelection.

If set, interval selection is allowed

Default value is false.

getLegend

ID of the element which is the current target of the association legend, or null.

sap.ui.unified.calendar.Month.getMetadata

Returns a metadata object for class sap.ui.unified.calendar.Month.

getNonWorkingDays

Gets current value of property nonWorkingDays.

If set, the provided weekdays are displayed as non-working days. Valid values inside the array are 0 to 6. If not set, the weekend defined in the locale settings is displayed as non-working days.

getPrimaryCalendarType

Gets current value of property primaryCalendarType.

If set, the calendar type is used for display. If not set, the calendar type of the global configuration is used.

getSecondaryCalendarType

Gets current value of property secondaryCalendarType.

If set, the days are also displayed in this calendar type If not set, the dates are only displayed in the primary calendar type

getSelectedDates

Gets content of aggregation selectedDates.

Date Ranges for selected dates of the DatePicker

getShowHeader

Gets current value of property showHeader.

If set, a header with the month name is shown

Default value is false.

getShowWeekNumbers

Gets current value of property showWeekNumbers.

Determines whether the week numbers in the months are displayed.

Note: For Islamic calendars, the week numbers are not displayed regardless of what is set to this property.

Default value is true.

getSingleSelection

Gets current value of property singleSelection.

If set, only a single date or interval, if intervalSelection is enabled, can be selected

Default value is true.

getSpecialDates

Gets content of aggregation specialDates.

DateRange with type to visualize special days in the Calendar.

Note: If one day is assigned to more than one DateTypeRange, only the first one will be used. The only exception is when one of the types is NonWorking, then you can have both NonWorking and the other type. For example, you can have NonWorking + Type01 but you can't have Type01 + Type02.

getWidth

Gets current value of property width.

Width of Month

indexOfDisabledDate

Checks for the provided sap.ui.unified.DateRange in the aggregation disabledDates. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oDisabledDate sap.ui.unified.DateRange

The disabledDate whose index is looked for

indexOfSelectedDate

Checks for the provided sap.ui.unified.DateRange in the aggregation selectedDates. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oSelectedDate sap.ui.unified.DateRange

The selectedDate whose index is looked for

indexOfSpecialDate

Checks for the provided sap.ui.unified.DateTypeRange in the aggregation specialDates. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oSpecialDate sap.ui.unified.DateTypeRange

The specialDate whose index is looked for

insertDisabledDate

Inserts a disabledDate into the aggregation disabledDates.

Param Type DefaultValue Description
oDisabledDate sap.ui.unified.DateRange

The disabledDate to insert; if empty, nothing is inserted

iIndex int

The 0-based index the disabledDate should be inserted at; for a negative value of iIndex, the disabledDate is inserted at position 0; for a value greater than the current size of the aggregation, the disabledDate is inserted at the last position

insertSelectedDate

Inserts a selectedDate into the aggregation selectedDates.

Param Type DefaultValue Description
oSelectedDate sap.ui.unified.DateRange

The selectedDate to insert; if empty, nothing is inserted

iIndex int

The 0-based index the selectedDate should be inserted at; for a negative value of iIndex, the selectedDate is inserted at position 0; for a value greater than the current size of the aggregation, the selectedDate is inserted at the last position

insertSpecialDate

Inserts a specialDate into the aggregation specialDates.

Param Type DefaultValue Description
oSpecialDate sap.ui.unified.DateTypeRange

The specialDate to insert; if empty, nothing is inserted

iIndex int

The 0-based index the specialDate should be inserted at; for a negative value of iIndex, the specialDate is inserted at position 0; for a value greater than the current size of the aggregation, the specialDate is inserted at the last position

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllDisabledDates

Removes all the controls from the aggregation disabledDates.

Additionally, it unregisters them from the hosting UIArea.

removeAllSelectedDates

Removes all the controls from the aggregation selectedDates.

Additionally, it unregisters them from the hosting UIArea.

removeAllSpecialDates

Removes all the controls from the aggregation specialDates.

Additionally, it unregisters them from the hosting UIArea.

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy int sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to be removed or its index or ID

removeDisabledDate

Removes a disabledDate from the aggregation disabledDates.

Param Type DefaultValue Description
vDisabledDate int string sap.ui.unified.DateRange

The disabledDate to remove or its index or id

removeSelectedDate

Removes a selectedDate from the aggregation selectedDates.

Param Type DefaultValue Description
vSelectedDate int string sap.ui.unified.DateRange

The selectedDate to remove or its index or id

removeSpecialDate

Removes a specialDate from the aggregation specialDates.

Param Type DefaultValue Description
vSpecialDate int string sap.ui.unified.DateTypeRange

The specialDate to remove or its index or id

setDate

Sets a new value for property date.

A date as JavaScript Date object. The month including this date is rendered and this date is focused initially (if no other focus is set).

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
oDate object

New value for property date

setFirstDayOfWeek

Sets a new value for property firstDayOfWeek.

If set, the first day of the displayed week is this day. Valid values are 0 to 6. If not a valid value is set, the default of the used locale is used.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is -1.

Param Type DefaultValue Description
iFirstDayOfWeek int -1

New value for property firstDayOfWeek

setIntervalSelection

Sets a new value for property intervalSelection.

If set, interval selection is allowed

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Param Type DefaultValue Description
bIntervalSelection boolean false

New value for property intervalSelection

setLegend

Sets the associated legend.

Param Type DefaultValue Description
oLegend sap.ui.core.ID sap.ui.unified.CalendarLegend

ID of an element which becomes the new target of this legend association; alternatively, an element instance may be given

setNonWorkingDays

Sets a new value for property nonWorkingDays.

If set, the provided weekdays are displayed as non-working days. Valid values inside the array are 0 to 6. If not set, the weekend defined in the locale settings is displayed as non-working days.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sNonWorkingDays int[]

New value for property nonWorkingDays

setPrimaryCalendarType

Sets a new value for property primaryCalendarType.

If set, the calendar type is used for display. If not set, the calendar type of the global configuration is used.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sPrimaryCalendarType sap.ui.core.CalendarType

New value for property primaryCalendarType

setSecondaryCalendarType

Sets a new value for property secondaryCalendarType.

If set, the days are also displayed in this calendar type If not set, the dates are only displayed in the primary calendar type

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sSecondaryCalendarType sap.ui.core.CalendarType

New value for property secondaryCalendarType

setShowHeader

Sets a new value for property showHeader.

If set, a header with the month name is shown

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
bShowHeader boolean false

New value for property showHeader

setShowWeekNumbers

Sets a new value for property showWeekNumbers.

Determines whether the week numbers in the months are displayed.

Note: For Islamic calendars, the week numbers are not displayed regardless of what is set to this property.

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
bShowWeekNumbers boolean true

New value for property showWeekNumbers

setSingleSelection

Sets a new value for property singleSelection.

If set, only a single date or interval, if intervalSelection is enabled, can be selected

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Param Type DefaultValue Description
bSingleSelection boolean true

New value for property singleSelection

setWidth

Sets a new value for property width.

Width of Month

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sWidth sap.ui.core.CSSSize

New value for property width