Class sap.ui.commons.DatePickerModule: sap/ui/commons/DatePicker
Allows end users to interact with dates. Entries can directly be written in, or selected from a calendar pad. Note: Dates can always be manually entered in the fix YYYYMMDD format, on top of the flexible "locale" format. If the value is provided via data binding, using a Date.type the formatter of the Date.type is used. Since version 1.22 the unified.Calendar is used inside the datePicker. So applications using the DatePicker should load the unified library. Otherwise it will be loaded the first time a DatePicker is opened.
Deprecated API:Since version 1.38. Instead, use the sap.m.DatePicker
control.
sClassName
and enriches it with the information contained in oClassInfo
. Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.
The supported settings are:
In addition, all settings applicable to the base type sap.ui.commons.TextField can be used as well.
{string} | sId? | id for the new control, generated automatically if no id is given |
{object} | mSettings? | initial settings for the new control |
- Deprecated:
- Since version 1.38. Instead, use the
sap.m.DatePicker
control.
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.ui.commons.TextField.extend.
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
Provides the following event parameters:
- 'newValue' of type
string
The new / changed value of the DatePicker. - 'newYyyymmdd' of type
string
The new / changed Yyyymmdd of the DatePicker. - 'invalidValue' of type
boolean
The new / changed value of the DatePicker is not a valid date.
{boolean} | bInvalidValue | true is value is invalid |
{sap.ui.commons.DatePicker} | this to allow method chaining |
locale
. Defines the locale (language and country), e.g. "en-US", whose translations and Date formatters should be used to render the DatePicker.If the value property is bound to a model using a Date type the locale will be ignored, because the locale information of the model are used.
{string} | Value of property locale |
yyyymmdd
. Defines the date as a "yyyymmdd" string, independent from the format used. The inherited textField "value" attribute uses the date format as configured via the locale. The date is interpreted as gregorian date
{string} | Value of property yyyymmdd |
locale
. Defines the locale (language and country), e.g. "en-US", whose translations and Date formatters should be used to render the DatePicker.If the value property is bound to a model using a Date type the locale will be ignored, because the locale information of the model are used.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sLocale | New value for property locale |
{sap.ui.commons.DatePicker} | Reference to this in order to allow method chaining |
yyyymmdd
. Defines the date as a "yyyymmdd" string, independent from the format used. The inherited textField "value" attribute uses the date format as configured via the locale. The date is interpreted as gregorian date
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sYyyymmdd | New value for property yyyymmdd |
{sap.ui.commons.DatePicker} | Reference to this in order to allow method chaining |