Basic Calendar. This calendar is used for DatePickers
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#constructor for a general description of the syntax of the settings object.
new sap.ui.unified.Calendar(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 |
Name | Type | Default Value | Description |
---|---|---|---|
_currentPicker | string | Holds a reference to the currently shown picker. Possible values: month, monthPicker, yearPicker and yearRangePicker. |
|
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. |
intervalSelection | boolean | false | If set, interval selection is allowed Visibility: public |
maxDate | object | 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 |
|
minDate | object | 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 |
|
months | int | 1 | 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. |
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. 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 |
|
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. |
|
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 |
|
showCurrentDateButton | boolean | false | Determines whether there is a shortcut navigation to Today. When used in Month, Year or Year-range picker view, the calendar navigates to Day picker view. |
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. |
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 Calendar Note: There is a theme depending minimum width, so the calendar can not be set smaller. |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
disabledDates | 0..n | sap.ui.unified.DateRange |
Dates or date ranges for disabled dates. To set a single date (instead of a range), set only the |
header | 0..1 | sap.ui.core.Control |
Hidden, for internal use only. |
month | 0..n | sap.ui.unified.calendar.Month | |
monthPicker | 0..1 | sap.ui.unified.calendar.MonthPicker | |
secondMonthHeader | 0..1 | sap.ui.unified.calendar.Header | |
selectedDates | 0..n | sap.ui.unified.DateRange |
Dates or date ranges for selected dates. To set a single date (instead of a range), set only the |
specialDates | 0..n | sap.ui.unified.DateTypeRange |
Dates or date ranges with type, to visualize special days in the To set a single date (instead of a range), set only the Note: Keep in mind that the |
yearPicker | 0..1 | sap.ui.unified.calendar.YearPicker | |
yearRangePicker | 0..1 | sap.ui.unified.calendar.YearPicker |
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 Note The legend does not have to be rendered but must exist, and all required types must be assigned. |
Event | Description |
---|---|
cancel |
Date selection was cancelled |
select |
Date selection changed |
startDateChange |
Use |
weekNumberSelect |
Week number selection changed. By default, clicking on the week number will select the corresponding week. If the week has already been selected, clicking the week number will deselect it. The default behavior can be prevented using the Note Works for Gregorian calendars only and when Listeners may prevent the default action of this event by calling the |
Date selection was cancelled
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Date selection changed
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
startDate
was changed while navigation in Calendar
Use getStartDate
function to determine the current start date
Since: 1.34.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Week number selection changed. By default, clicking on the week number will select the corresponding week. If the week has already been selected, clicking 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.56.
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. |
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. |
attachCancel |
Attaches event handler When called, the context of the event handler (its Date selection was cancelled |
attachSelect |
Attaches event handler When called, the context of the event handler (its Date selection changed |
attachStartDateChange |
Attaches event handler When called, the context of the event handler (its
Use |
attachWeekNumberSelect |
Attaches event handler When called, the context of the event handler (its Week number selection changed. By default, clicking on the week number will select the corresponding week. If the week has already been selected, clicking the week number will deselect it. The default behavior can be prevented using the Note Works for Gregorian calendars only and when |
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 |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSelect |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachStartDateChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachWeekNumberSelect |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
displayDate |
Displays a date in the calendar but doesn't set the focus. |
sap.ui.unified.Calendar.extend |
Creates a new subclass of class sap.ui.unified.Calendar with name
|
fireCancel |
Fires event cancel to attached listeners. |
fireSelect |
Fires event select to attached listeners. |
fireStartDateChange |
Fires event startDateChange to attached listeners. |
fireWeekNumberSelect |
Fires event weekNumberSelect to attached listeners. Listeners may prevent the default action of this event by calling the |
focusDate |
Displays and 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. Dates or date ranges for disabled dates. To set a single date (instead of a range), set only the |
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 |
getIntervalSelection |
Gets current value of property intervalSelection. If set, interval selection is allowed Default value is |
getLegend |
ID of the element which is the current target of the association legend, or |
getMaxDate |
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 |
sap.ui.unified.Calendar.getMetadata |
Returns a metadata object for class sap.ui.unified.Calendar. |
getMinDate |
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 |
getMonths |
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 |
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. 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 |
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. Dates or date ranges for selected dates. To set a single date (instead of a range), set only the |
getShowCurrentDateButton |
Gets current value of property showCurrentDateButton. Determines whether there is a shortcut navigation to Today. When used in Month, Year or Year-range picker view, the calendar navigates to Day picker view. Default value is |
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 |
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 |
getSpecialDates |
Gets content of aggregation specialDates. Dates or date ranges with type, to visualize special days in the To set a single date (instead of a range), set only the Note: Keep in mind that the |
getStartDate |
Returns the first day of the displayed month. There might be some days of the previous month shown, but they can not be focused. |
getWidth |
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. |
indexOfDisabledDate |
Checks for the provided |
indexOfSelectedDate |
Checks for the provided |
indexOfSpecialDate |
Checks for the provided |
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. |
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 Default value is |
setIntervalSelection |
Sets a new value for property intervalSelection. If set, interval selection is allowed When called with a value of Default value is |
setLegend |
Sets the associated legend. |
setMaxDate |
Sets a maximum date for the calendar. |
setMinDate |
Sets a minimum date for the calendar. |
setMonths |
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 Default value is |
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. 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 When called with a value of |
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 |
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 |
setShowCurrentDateButton |
Sets the visibility of the Current date button in the calendar. |
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 Default value is |
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 Default value is |
setWidth |
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 |
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 |
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 |
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 |
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 |
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
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 |
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
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 |
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
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 |
Attaches event handler fnFunction
to the weekNumberSelect 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.
Week number selection changed. By default, clicking on the week number will select the corresponding week. If the week has already been selected, clicking 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 |
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.
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 |
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.
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 |
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.
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 |
Detaches event handler fnFunction
from the weekNumberSelect event of this sap.ui.unified.Calendar
.
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 |
Displays a date in the calendar but doesn't set the focus.
Param | Type | DefaultValue | Description |
---|---|---|---|
oDate | Object |
JavaScript date object for focused date. |
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.
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 |
Fires event cancel to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event select to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event startDateChange to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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. |
Displays and sets the focused date of the calendar.
Param | Type | DefaultValue | Description |
---|---|---|---|
oDate | Object |
A JavaScript date object for focused date |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
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.
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
.
Gets current value of property intervalSelection.
If set, interval selection is allowed
Default value is false
.
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
.
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
.
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
.
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.
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.
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
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.
Gets current value of property showCurrentDateButton.
Determines whether there is a shortcut navigation to Today. When used in Month, Year or Year-range picker view, the calendar navigates to Day picker view.
Default value is false
.
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
.
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
.
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 the first day of the displayed month.
There might be some days of the previous month shown, but they can not be focused.
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.
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 |
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 |
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 |
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 |
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 |
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 |
Removes all the controls from the aggregation disabledDates.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation selectedDates.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation specialDates.
Additionally, it unregisters them from the hosting UIArea.
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Sets a maximum date for the calendar.
Param | Type | DefaultValue | Description |
---|---|---|---|
oDate | Date |
a JavaScript date |
Sets a minimum date for the calendar.
Param | Type | DefaultValue | Description |
---|---|---|---|
oDate | Date |
a JavaScript date |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iMonths | int | 1 |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sNonWorkingDays | int[] |
New value for property |
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 |
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 |
Sets the visibility of the Current date button in the calendar.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShow | boolean |
whether the Today button will be displayed |
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 |
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 |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sWidth | sap.ui.core.CSSSize |
New value for property |