class sap.ui.unified.calendar.DatesRow

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

renders a row of days 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/DatesRow.

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.DatesRow(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
days int 7

number of days displayed

Visibility: public
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.

Since: 1.34.0.

Visibility: public
startDate object

Start date of the row If in rendering phase the date property is not in the range startDate + days, it is set to the start date So after setting the start date the date should be set to be in the range of the start date

Visibility: public

Borrowed Properties

Name Type Default Value Description
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

Borrowed Aggregations

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.


Methods Overview

Method Description
displayDate

displays the a given date without setting the focus

Property date date to be focused or displayed. It must be in the displayed date range beginning with startDate and days days So set this properties before setting the date.

sap.ui.unified.calendar.DatesRow.extend

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

getDays

Gets current value of property days.

number of days displayed

Default value is 7.

sap.ui.unified.calendar.DatesRow.getMetadata

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

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

getStartDate

Gets current value of property startDate.

Start date of the row If in rendering phase the date property is not in the range startDate + days, it is set to the start date So after setting the start date the date should be set to be in the range of the start date

setDate

Setter for property date.

Property date date to be focused or displayed. It must be in the displayed date range beginning with startDate and days days So set this properties before setting the date.

setDays

Sets a new value for property days.

number of days displayed

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

Default value is 7.

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 null or undefined, the default value of the property will be restored.

Default value is true.

setStartDate

Sets a new value for property startDate.

Start date of the row If in rendering phase the date property is not in the range startDate + days, it is set to the start date So after setting the start date the date should be set to be in the range of the start date

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

displayDate

displays the a given date without setting the focus

Property date date to be focused or displayed. It must be in the displayed date range beginning with startDate and days days So set this properties before setting the date.

Param Type DefaultValue Description
oDate object

JavaScript date object for focused date.

sap.ui.unified.calendar.DatesRow.extend

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

getDays

Gets current value of property days.

number of days displayed

Default value is 7.

sap.ui.unified.calendar.DatesRow.getMetadata

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

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

getStartDate

Gets current value of property startDate.

Start date of the row If in rendering phase the date property is not in the range startDate + days, it is set to the start date So after setting the start date the date should be set to be in the range of the start date

setDate

Setter for property date.

Property date date to be focused or displayed. It must be in the displayed date range beginning with startDate and days days So set this properties before setting the date.

Param Type DefaultValue Description
oDate object

JavaScript date object for start date.

setDays

Sets a new value for property days.

number of days displayed

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 days

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 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 showDayNamesLine

setStartDate

Sets a new value for property startDate.

Start date of the row If in rendering phase the date property is not in the range startDate + days, it is set to the start date So after setting the start date the date should be set to be in the range of the start date

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 startDate