class sap.m.DynamicDateOption

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

A base type for the options used by the DynamicDateRange control.


Constructor

Constructor for a new DynamicDateOption.

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.m.DynamicDateOption(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
key string

A key which identifies the option. The option produces DynamicDateRange values with operator same as the option key.

Visibility: public
valueTypes string[]

Defines the types of the option's parameters. Possible values for the array items are "date" and "int". A date range is usually represented with two consecutive "date" values.

Visibility: public

Methods Overview

Method Description
createValueHelpUI

Creates the option's value help UI. Mainly used for custom scenarios where getValueHelpUITypes is not enough to define the UI.

enhanceFormattedValue

Controls whether the formatted date range should be concatenated to the formatted value when displayed.

sap.m.DynamicDateOption.extend

Creates a new subclass of class sap.m.DynamicDateOption 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.

format

Formats the option's value to a string.

getGroup

Provides the order index of the option's group. Used for grouping within the options list inside a DynamicDateRange's popup. Standard options are arranged in 6 groups - from 1 to 6.

getGroupHeader

Provides the option's group header text.

getKey

Gets current value of property key.

A key which identifies the option. The option produces DynamicDateRange values with operator same as the option key.

sap.m.DynamicDateOption.getMetadata

Returns a metadata object for class sap.m.DynamicDateOption.

getText

Defines the option's label for the DynamicDateRange's list of options.

getValueHelpOutput

Gets the value help controls' output values and converts them to a DynamicDateRange value.

getValueHelpUITypes

Defines the UI types of the option. They are used to create predefined UI for the DynamicDateRange's value help dialog corresponding to this option. The types are DynamicDateValueHelpUIType instances. Their possible values are "date", "daterange", "month", "int". The created UI consists of Calendar or Input controls.

getValueTypes

Gets current value of property valueTypes.

Defines the types of the option's parameters. Possible values for the array items are "date" and "int". A date range is usually represented with two consecutive "date" values.

parse

Parses a string to a DynamicDateRange value.

setKey

Sets a new value for property key.

A key which identifies the option. The option produces DynamicDateRange values with operator same as the option key.

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

setValueTypes

Sets a new value for property valueTypes.

Defines the types of the option's parameters. Possible values for the array items are "date" and "int". A date range is usually represented with two consecutive "date" values.

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

toDates

Calculates an absolute date range from the options relative value.

validateValueHelpUI

Validates all input controls in the value help UI related to the current option. If one of the input controls contains invalid value, then validation will return false. If all input controls contain valid value, then the validation will return true.

createValueHelpUI

Creates the option's value help UI. Mainly used for custom scenarios where getValueHelpUITypes is not enough to define the UI.

Param Type DefaultValue Description
oControl sap.m.DynamicDateRange

The control instance

fnControlsUpdated function

A callback invoked when any of the created controls updates its value

enhanceFormattedValue

Controls whether the formatted date range should be concatenated to the formatted value when displayed.

sap.m.DynamicDateOption.extend

Creates a new subclass of class sap.m.DynamicDateOption 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

format

Formats the option's value to a string.

Param Type DefaultValue Description
oValue object

A DynamicDateRange value

getGroup

Provides the order index of the option's group. Used for grouping within the options list inside a DynamicDateRange's popup. Standard options are arranged in 6 groups - from 1 to 6.

getGroupHeader

Provides the option's group header text.

getKey

Gets current value of property key.

A key which identifies the option. The option produces DynamicDateRange values with operator same as the option key.

sap.m.DynamicDateOption.getMetadata

Returns a metadata object for class sap.m.DynamicDateOption.

getText

Defines the option's label for the DynamicDateRange's list of options.

Param Type DefaultValue Description
oControl sap.m.DynamicDateRange

The control instance which the label may depend on

getValueHelpOutput

Gets the value help controls' output values and converts them to a DynamicDateRange value.

Param Type DefaultValue Description
oControl sap.m.DynamicDateRange

The control instance

getValueHelpUITypes

Defines the UI types of the option. They are used to create predefined UI for the DynamicDateRange's value help dialog corresponding to this option. The types are DynamicDateValueHelpUIType instances. Their possible values are "date", "daterange", "month", "int". The created UI consists of Calendar or Input controls.

Param Type DefaultValue Description
oControl sap.m.DynamicDateRange

The control instance

getValueTypes

Gets current value of property valueTypes.

Defines the types of the option's parameters. Possible values for the array items are "date" and "int". A date range is usually represented with two consecutive "date" values.

parse

Parses a string to a DynamicDateRange value.

Param Type DefaultValue Description
sValue string

An input string

setKey

Sets a new value for property key.

A key which identifies the option. The option produces DynamicDateRange values with operator same as the option key.

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

Param Type DefaultValue Description
sKey string

New value for property key

setValueTypes

Sets a new value for property valueTypes.

Defines the types of the option's parameters. Possible values for the array items are "date" and "int". A date range is usually represented with two consecutive "date" values.

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

Param Type DefaultValue Description
sValueTypes string[]

New value for property valueTypes

toDates

Calculates an absolute date range from the options relative value.

Param Type DefaultValue Description
oValue object

A DynamicDateRange value

validateValueHelpUI

Validates all input controls in the value help UI related to the current option. If one of the input controls contains invalid value, then validation will return false. If all input controls contain valid value, then the validation will return true.

Param Type DefaultValue Description
oControl sap.m.DynamicDateRange

The control instance