CalendarDateInterval
only visualizes the dates in a one-line interval and allows the selection of a single day.
Constructor for a new CalendarDateInterval
.
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.CalendarDateInterval(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 |
---|---|---|---|
days | int | 7 | number of days displayed on phones the maximum rendered number of days is 8. Visibility: public |
pickerPopup | boolean | false | If set, the month- and yearPicker opens on a popup |
showDayNamesLine | boolean | true | If set the day names are shown in a separate line. If not set the day names are shown inside the single days. |
startDate | object | Start date of the Interval Visibility: public |
Name | Type | Default Value | Description |
---|---|---|---|
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. |
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 |
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 |
Method | Description |
---|---|
_getDaysLarge |
If more than this number of days are displayed, start and end month are displayed on the button. |
sap.ui.unified.CalendarDateInterval.extend |
Creates a new subclass of class sap.ui.unified.CalendarDateInterval with name
|
getDays |
Gets current value of property days. number of days displayed on phones the maximum rendered number of days is 8. Default value is |
sap.ui.unified.CalendarDateInterval.getMetadata |
Returns a metadata object for class sap.ui.unified.CalendarDateInterval. |
getPickerPopup |
Gets current value of property pickerPopup. If set, the month- and yearPicker opens on a popup Default value is |
getShowDayNamesLine |
Gets current value of property showDayNamesLine. If set the day names are shown in a separate line. If not set the day names are shown inside the single days. Default value is |
getStartDate |
Gets current value of property startDate. Start date of the Interval |
setDays |
Sets a new value for property days. number of days displayed on phones the maximum rendered number of days is 8. When called with a value of Default value is |
setFirstDayOfWeek |
Setter for property Property |
setMonths |
Setter for property Property |
setPickerPopup |
Sets a new value for property pickerPopup. If set, the month- and yearPicker opens on a popup When called with a value of Default value is |
setShowDayNamesLine |
Sets a new value for property showDayNamesLine. If set the day names are shown in a separate line. If not set the day names are shown inside the single days. When called with a value of Default value is |
setStartDate |
Sets a new value for property startDate. Start date of the Interval When called with a value of |
If more than this number of days are displayed, start and end month are displayed on the button.
Creates a new subclass of class sap.ui.unified.CalendarDateInterval 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.unified.Calendar.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 |
Gets current value of property days.
number of days displayed on phones the maximum rendered number of days is 8.
Default value is 7
.
Returns a metadata object for class sap.ui.unified.CalendarDateInterval.
Gets current value of property pickerPopup.
If set, the month- and yearPicker opens on a popup
Default value is false
.
Gets current value of property showDayNamesLine.
If set the day names are shown in a separate line. If not set the day names are shown inside the single days.
Default value is true
.
Sets a new value for property days.
number of days displayed on phones the maximum rendered number of days is 8.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 7
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iDays | int | 7 |
New value for property |
Setter for property firstDayOfWeek
.
Property firstDayOfWeek
is not supported in sap.ui.unified.CalendarDateInterval
control.
Param | Type | DefaultValue | Description |
---|---|---|---|
iFirstDayOfWeek | int |
First day of the week |
Setter for property months
.
Property months
is not supported in sap.ui.unified.CalendarDateInterval
control.
Param | Type | DefaultValue | Description |
---|---|---|---|
iMonths | int |
How many months to be displayed |
Sets a new value for property pickerPopup.
If set, the month- and yearPicker opens on a popup
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 |
---|---|---|---|
bPickerPopup | boolean | false |
New value for property |
Sets a new value for property showDayNamesLine.
If set the day names are shown in a separate line. If not set the day names are shown inside the single days.
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 |
---|---|---|---|
bShowDayNamesLine | boolean | true |
New value for property |
Sets a new value for property startDate.
Start date of the Interval
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oStartDate | object |
New value for property |