Class sap.ui.unified.CalendarModule: sap/ui/unified/Calendar

extends Control
known direct subclasses: CalendarDateInterval

Basic Calendar. This calendar is used for DatePickers
Since: 1.22.0.
Constructor Summary
new sap.ui.unified.Calendar(sId?, mSettings?)Constructor for a new Calendar.
Event Summary
cancel(oControlEvent)Date selection was cancelled
select(oControlEvent)Date selection changed
startDateChange(oControlEvent)startDate was changed while navigation in Calendar Use getStartDate function to determine the current start date
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.unified.Calendar.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.unified.Calendar with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.unified.Calendar.getMetadata()Returns a metadata object for class sap.ui.unified.Calendar.
addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy.
addDisabledDate(oDisabledDate)Adds some disabledDate to the aggregation disabledDates.
addSelectedDate(oSelectedDate)Adds some selectedDate to the aggregation selectedDates.
addSpecialDate(oSpecialDate)Adds some specialDate to the aggregation specialDates.
attachCancel(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the cancel event of this sap.ui.unified.Calendar.
attachSelect(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the select event of this sap.ui.unified.Calendar.
attachStartDateChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the startDateChange event of this sap.ui.unified.Calendar.
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.
detachCancel(fnFunction, oListener)Detaches event handler fnFunction from the cancel event of this sap.ui.unified.Calendar.
detachSelect(fnFunction, oListener)Detaches event handler fnFunction from the select event of this sap.ui.unified.Calendar.
detachStartDateChange(fnFunction, oListener)Detaches event handler fnFunction from the startDateChange event of this sap.ui.unified.Calendar.
displayDate(oDate)Displays a date in the calendar but don't set the focus.
fireCancel(mParameters?)Fires event cancel to attached listeners.
fireSelect(mParameters?)Fires event select to attached listeners.
fireStartDateChange(mParameters?)Fires event startDateChange to attached listeners.
focusDate(oDate)Sets the focused date of the calendar.
getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
getDisabledDates()Gets content of aggregation disabledDates.
getFirstDayOfWeek()Gets current value of property firstDayOfWeek.
getIntervalSelection()Gets current value of property intervalSelection.
getLegend()ID of the element which is the current target of the association legend, or null.
getMaxDate()Gets current value of property maxDate.
getMinDate()Gets current value of property minDate.
getMonths()Gets current value of property months.
getNonWorkingDays()Gets current value of property nonWorkingDays.
getPrimaryCalendarType()Gets current value of property primaryCalendarType.
getSecondaryCalendarType()Gets current value of property secondaryCalendarType.
getSelectedDates()Gets content of aggregation selectedDates.
getShowWeekNumbers()Gets current value of property showWeekNumbers.
getSingleSelection()Gets current value of property singleSelection.
getSpecialDates()Gets content of aggregation specialDates.
getStartDate()Returns the first day of the displayed month.
getWidth()Gets current value of property width.
indexOfDisabledDate(oDisabledDate)Checks for the provided sap.ui.unified.DateRange in the aggregation disabledDates.
indexOfSelectedDate(oSelectedDate)Checks for the provided sap.ui.unified.DateRange in the aggregation selectedDates.
indexOfSpecialDate(oSpecialDate)Checks for the provided sap.ui.unified.DateTypeRange in the aggregation specialDates.
insertDisabledDate(oDisabledDate, iIndex)Inserts a disabledDate into the aggregation disabledDates.
insertSelectedDate(oSelectedDate, iIndex)Inserts a selectedDate into the aggregation selectedDates.
insertSpecialDate(oSpecialDate, iIndex)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.
removeAllSelectedDates()Removes all the controls from the aggregation selectedDates.
removeAllSpecialDates()Removes all the controls from the aggregation specialDates.
removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy.
removeDisabledDate(vDisabledDate)Removes a disabledDate from the aggregation disabledDates.
removeSelectedDate(vSelectedDate)Removes a selectedDate from the aggregation selectedDates.
removeSpecialDate(vSpecialDate)Removes a specialDate from the aggregation specialDates.
setFirstDayOfWeek(iFirstDayOfWeek)Sets a new value for property firstDayOfWeek.
setIntervalSelection(bIntervalSelection)Sets a new value for property intervalSelection.
setLegend(oLegend)Sets the associated legend.
setMonths(iMonths)Sets a new value for property months.
setNonWorkingDays(sNonWorkingDays)Sets a new value for property nonWorkingDays.
setPrimaryCalendarType(sPrimaryCalendarType)Sets a new value for property primaryCalendarType.
setSecondaryCalendarType(sSecondaryCalendarType)Sets a new value for property secondaryCalendarType.
setShowWeekNumbers(bShowWeekNumbers)Sets a new value for property showWeekNumbers.
setSingleSelection(bSingleSelection)Sets a new value for property singleSelection.
setWidth(sWidth)Sets a new value for property width.
Constructor Detail
new sap.ui.unified.Calendar(sId?, mSettings?)

Constructor for a new Calendar.

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
cancel(oControlEvent)
Date selection was cancelled
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
select(oControlEvent)
Date selection changed
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
startDateChange(oControlEvent)

startDate was changed while navigation in Calendar

Use getStartDate function to determine the current start date

Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
Since:
1.34.0
Method Detail
sap.ui.unified.Calendar.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.ui.unified.Calendar 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.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.unified.Calendar.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addAriaLabelledBy(vAriaLabelledBy): sap.ui.unified.Calendar
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledBythe ariaLabelledBy to add; if empty, nothing is inserted
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.28.0
addDisabledDate(oDisabledDate): sap.ui.unified.Calendar
Adds some disabledDate to the aggregation disabledDates.
Parameters:
sap.ui.unified.DateRangeoDisabledDatethe disabledDate to add; if empty, nothing is inserted
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.38.0
addSelectedDate(oSelectedDate): sap.ui.unified.Calendar
Adds some selectedDate to the aggregation selectedDates.
Parameters:
sap.ui.unified.DateRangeoSelectedDatethe selectedDate to add; if empty, nothing is inserted
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
addSpecialDate(oSpecialDate): sap.ui.unified.Calendar
Adds some specialDate to the aggregation specialDates.
Parameters:
sap.ui.unified.DateTypeRangeoSpecialDatethe specialDate to add; if empty, nothing is inserted
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.24.0
attachCancel(oData?, fnFunction, oListener?): sap.ui.unified.Calendar

Attaches event handler fnFunction to the cancel event of this sap.ui.unified.Calendar.

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

Date selection was cancelled

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 itself
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
attachSelect(oData?, fnFunction, oListener?): sap.ui.unified.Calendar

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

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

Date selection changed

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 itself
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
attachStartDateChange(oData?, fnFunction, oListener?): sap.ui.unified.Calendar

Attaches event handler fnFunction to the startDateChange event of this sap.ui.unified.Calendar.

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

startDate was changed while navigation in Calendar

Use getStartDate function to determine the current start date

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 itself
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.34.0
destroyDisabledDates(): sap.ui.unified.Calendar
Destroys all the disabledDates in the aggregation disabledDates.
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.38.0
destroySelectedDates(): sap.ui.unified.Calendar
Destroys all the selectedDates in the aggregation selectedDates.
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
destroySpecialDates(): sap.ui.unified.Calendar
Destroys all the specialDates in the aggregation specialDates.
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.24.0
detachCancel(fnFunction, oListener): sap.ui.unified.Calendar

Detaches event handler fnFunction from the cancel event of this sap.ui.unified.Calendar.

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.CalendarReference to this in order to allow method chaining
detachSelect(fnFunction, oListener): sap.ui.unified.Calendar

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

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.CalendarReference to this in order to allow method chaining
detachStartDateChange(fnFunction, oListener): sap.ui.unified.Calendar

Detaches event handler fnFunction from the startDateChange event of this sap.ui.unified.Calendar.

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.CalendarReference to this in order to allow method chaining
Since:
1.34.0
displayDate(oDate): sap.ui.unified.Calendar
Displays a date in the calendar but don't set the focus.
Parameters:
ObjectoDateJavaScript date object for focused date.
Returns:
sap.ui.unified.Calendarthis to allow method chaining
Since:
1.28.0
fireCancel(mParameters?): sap.ui.unified.Calendar
Fires event cancel to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
fireSelect(mParameters?): sap.ui.unified.Calendar
Fires event select to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
fireStartDateChange(mParameters?): sap.ui.unified.Calendar
Fires event startDateChange to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.34.0
focusDate(oDate): sap.ui.unified.Calendar
Sets the focused date of the calendar.
Parameters:
ObjectoDateJavaScript date object for focused date.
Returns:
sap.ui.unified.Calendarthis to allow method chaining
getAriaLabelledBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
sap.ui.core.ID[]
Since:
1.28.0
getDisabledDates(): sap.ui.unified.DateRange[]

Gets content of aggregation disabledDates.

Dates or date ranges for disabled dates.

To set a single date (instead of a range), set only the startDate property of the sap.ui.unified.DateRange class.

Returns:
sap.ui.unified.DateRange[]
Since:
1.38.0
getFirstDayOfWeek(): int

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.

Returns:
intValue of property firstDayOfWeek
Since:
1.28.9
getIntervalSelection(): boolean

Gets current value of property intervalSelection.

If set, interval selection is allowed

Default value is false.

Returns:
booleanValue of property intervalSelection
getLegend(): sap.ui.core.ID
ID of the element which is the current target of the association legend, or null.
Returns:
sap.ui.core.ID
Since:
1.38.5
getMaxDate(): object

Gets current value of property maxDate.

Maximum date that can be shown and selected in the Calendar. This must be a JavaScript date object.

Note: if the date is inside of a month the complete month is displayed, but dates outside the valid range can not be selected.

Note: If the maxDate is set to be before the minDate, the minDate is set to the begin of the month of the maxDate.

Returns:
objectValue of property maxDate
Since:
1.38.0
getMinDate(): object

Gets current value of property minDate.

Minimum date that can be shown and selected in the Calendar. This must be a JavaScript date object.

Note: if the date is inside of a month the complete month is displayed, but dates outside the valid range can not be selected.

Note: If the minDate is set to be after the maxDate, the maxDate is set to the end of the month of the minDate.

Returns:
objectValue of property minDate
Since:
1.38.0
getMonths(): int

Gets current value of property months.

Determines the number of months displayed.

As of version 1.50, the duplicated dates are not displayed if there are multiple months.

Note: On phones, only one month is displayed.

Default value is 1.

Returns:
intValue of property months
Since:
1.28.0
getNonWorkingDays(): int[]

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.

Note: Keep in mind that this property sets only weekly-recurring days as non-working. If you need specific dates or dates ranges, such as national holidays, use the specialDates aggregation to set them. Both the non-working days (from property) and dates (from aggregation) are visualized the same.

Returns:
int[]Value of property nonWorkingDays
Since:
1.28.9
getPrimaryCalendarType(): sap.ui.core.CalendarType

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.

Returns:
sap.ui.core.CalendarTypeValue of property primaryCalendarType
Since:
1.34.0
getSecondaryCalendarType(): sap.ui.core.CalendarType

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

Returns:
sap.ui.core.CalendarTypeValue of property secondaryCalendarType
Since:
1.34.0
getSelectedDates(): sap.ui.unified.DateRange[]

Gets content of aggregation selectedDates.

Dates or date ranges for selected dates.

To set a single date (instead of a range), set only the startDate property of the sap.ui.unified.DateRange class.

Returns:
sap.ui.unified.DateRange[]
getShowWeekNumbers(): boolean

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.

Returns:
booleanValue of property showWeekNumbers
Since:
1.48
getSingleSelection(): boolean

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.

Returns:
booleanValue of property singleSelection
getSpecialDates(): sap.ui.unified.DateTypeRange[]

Gets content of aggregation specialDates.

Dates or date ranges with type, to visualize special days in the Calendar. If one day is assigned to more than one Type, only the first one will be used.

To set a single date (instead of a range), set only the startDate property of the sap.ui.unified.DateRange class.

Note: Keep in mind that the NonWorking type is for marking specific dates or date ranges as non-working, where if you need a weekly-reccuring non-working days (weekend), you should use the nonWorkingDays property. Both the non-working days (from property) and dates (from aggregation) are visualized the same.

Returns:
sap.ui.unified.DateTypeRange[]
Since:
1.24.0
getStartDate(): Object

Returns the first day of the displayed month.

There might be some days of the previous month shown, but they can not be focused.

Returns:
ObjectJavaScript date object for start date.
Since:
1.34.1
getWidth(): sap.ui.core.CSSSize

Gets current value of property width.

Width of Calendar

Note: There is a theme depending minimum width, so the calendar can not be set smaller.

Returns:
sap.ui.core.CSSSizeValue of property width
Since:
1.38.0
indexOfDisabledDate(oDisabledDate): int
Checks for the provided sap.ui.unified.DateRange in the aggregation disabledDates. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.unified.DateRangeoDisabledDateThe disabledDate whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
Since:
1.38.0
indexOfSelectedDate(oSelectedDate): int
Checks for the provided sap.ui.unified.DateRange in the aggregation selectedDates. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.unified.DateRangeoSelectedDateThe selectedDate whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
indexOfSpecialDate(oSpecialDate): int
Checks for the provided sap.ui.unified.DateTypeRange in the aggregation specialDates. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.unified.DateTypeRangeoSpecialDateThe specialDate whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
Since:
1.24.0
insertDisabledDate(oDisabledDate, iIndex): sap.ui.unified.Calendar
Inserts a disabledDate into the aggregation disabledDates.
Parameters:
sap.ui.unified.DateRangeoDisabledDatethe disabledDate to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.38.0
insertSelectedDate(oSelectedDate, iIndex): sap.ui.unified.Calendar
Inserts a selectedDate into the aggregation selectedDates.
Parameters:
sap.ui.unified.DateRangeoSelectedDatethe selectedDate to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
insertSpecialDate(oSpecialDate, iIndex): sap.ui.unified.Calendar
Inserts a specialDate into the aggregation specialDates.
Parameters:
sap.ui.unified.DateTypeRangeoSpecialDatethe specialDate to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.24.0
removeAllAriaLabelledBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaLabelledBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
Since:
1.28.0
removeAllDisabledDates(): sap.ui.unified.DateRange[]

Removes all the controls from the aggregation disabledDates.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.unified.DateRange[]An array of the removed elements (might be empty)
Since:
1.38.0
removeAllSelectedDates(): sap.ui.unified.DateRange[]

Removes all the controls from the aggregation selectedDates.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.unified.DateRange[]An array of the removed elements (might be empty)
removeAllSpecialDates(): sap.ui.unified.DateTypeRange[]

Removes all the controls from the aggregation specialDates.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.unified.DateTypeRange[]An array of the removed elements (might be empty)
Since:
1.24.0
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.ID
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledByThe ariaLabelledBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed ariaLabelledBy or null
Since:
1.28.0
removeDisabledDate(vDisabledDate): sap.ui.unified.DateRange
Removes a disabledDate from the aggregation disabledDates.
Parameters:
int|string|sap.ui.unified.DateRangevDisabledDateThe disabledDate to remove or its index or id
Returns:
sap.ui.unified.DateRangeThe removed disabledDate or null
Since:
1.38.0
removeSelectedDate(vSelectedDate): sap.ui.unified.DateRange
Removes a selectedDate from the aggregation selectedDates.
Parameters:
int|string|sap.ui.unified.DateRangevSelectedDateThe selectedDate to remove or its index or id
Returns:
sap.ui.unified.DateRangeThe removed selectedDate or null
removeSpecialDate(vSpecialDate): sap.ui.unified.DateTypeRange
Removes a specialDate from the aggregation specialDates.
Parameters:
int|string|sap.ui.unified.DateTypeRangevSpecialDateThe specialDate to remove or its index or id
Returns:
sap.ui.unified.DateTypeRangeThe removed specialDate or null
Since:
1.24.0
setFirstDayOfWeek(iFirstDayOfWeek): sap.ui.unified.Calendar

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.

Parameters:
intiFirstDayOfWeekNew value for property firstDayOfWeek
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.28.9
setIntervalSelection(bIntervalSelection): sap.ui.unified.Calendar

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.

Parameters:
booleanbIntervalSelectionNew value for property intervalSelection
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
setLegend(oLegend): sap.ui.unified.Calendar
Sets the associated legend.
Parameters:
sap.ui.core.ID|sap.ui.unified.CalendarLegendoLegendID of an element which becomes the new target of this legend association; alternatively, an element instance may be given
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.38.5
setMonths(iMonths): sap.ui.unified.Calendar

Sets a new value for property months.

Determines the number of months displayed.

As of version 1.50, the duplicated dates are not displayed if there are multiple months.

Note: On phones, only one month is displayed.

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

Default value is 1.

Parameters:
intiMonthsNew value for property months
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.28.0
setNonWorkingDays(sNonWorkingDays): sap.ui.unified.Calendar

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.

Note: Keep in mind that this property sets only weekly-recurring days as non-working. If you need specific dates or dates ranges, such as national holidays, use the specialDates aggregation to set them. Both the non-working days (from property) and dates (from aggregation) are visualized the same.

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

Parameters:
int[]sNonWorkingDaysNew value for property nonWorkingDays
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.28.9
setPrimaryCalendarType(sPrimaryCalendarType): sap.ui.unified.Calendar

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.

Parameters:
sap.ui.core.CalendarTypesPrimaryCalendarTypeNew value for property primaryCalendarType
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.34.0
setSecondaryCalendarType(sSecondaryCalendarType): sap.ui.unified.Calendar

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.

Parameters:
sap.ui.core.CalendarTypesSecondaryCalendarTypeNew value for property secondaryCalendarType
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.34.0
setShowWeekNumbers(bShowWeekNumbers): sap.ui.unified.Calendar

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.

Parameters:
booleanbShowWeekNumbersNew value for property showWeekNumbers
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.48
setSingleSelection(bSingleSelection): sap.ui.unified.Calendar

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.

Parameters:
booleanbSingleSelectionNew value for property singleSelection
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
setWidth(sWidth): sap.ui.unified.Calendar

Sets a new value for property width.

Width of Calendar

Note: There is a theme depending minimum width, so the calendar can not be set smaller.

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

Parameters:
sap.ui.core.CSSSizesWidthNew value for property width
Returns:
sap.ui.unified.CalendarReference to this in order to allow method chaining
Since:
1.38.0