class sap.ui.unified.DateRange

Control sample: sap.ui.unified.DateRange
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/unified/DateRange
Application Component: CA-UI5-CTR

Date range for use in DatePicker


Constructor

Constructor for a new DateRange.

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.DateRange(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
endDate object

End date for a date range. If empty only a single date is presented by this DateRange element. This must be a JavaScript date object.

Visibility: public
startDate object

Start date for a date range. This must be a JavaScript date object.

Visibility: public

Methods Overview

Method Description
sap.ui.unified.DateRange.extend

Creates a new subclass of class sap.ui.unified.DateRange 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.Element.extend.

getEndDate

Gets current value of property endDate.

End date for a date range. If empty only a single date is presented by this DateRange element. This must be a JavaScript date object.

sap.ui.unified.DateRange.getMetadata

Returns a metadata object for class sap.ui.unified.DateRange.

getStartDate

Gets current value of property startDate.

Start date for a date range. This must be a JavaScript date object.

setEndDate

Sets a new value for property endDate.

End date for a date range. If empty only a single date is presented by this DateRange element. This must be a JavaScript date object.

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

setStartDate

Sets a new value for property startDate.

Start date for a date range. This must be a JavaScript date object.

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

sap.ui.unified.DateRange.extend

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

getEndDate

Gets current value of property endDate.

End date for a date range. If empty only a single date is presented by this DateRange element. This must be a JavaScript date object.

sap.ui.unified.DateRange.getMetadata

Returns a metadata object for class sap.ui.unified.DateRange.

getStartDate

Gets current value of property startDate.

Start date for a date range. This must be a JavaScript date object.

setEndDate

Sets a new value for property endDate.

End date for a date range. If empty only a single date is presented by this DateRange element. This must be a JavaScript date object.

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

Param Type DefaultValue Description
oEndDate object

New value for property endDate

setStartDate

Sets a new value for property startDate.

Start date for a date range. This must be a JavaScript date object.

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