date-time-picker(key
, value
, ..., key
, value
)
Inserts in generated content a text field control and a button which displays a dialog box allowing to select a date/time. This control can be used to edit the value of the element which is the target of the CSS rule. If "attribute,
" is specified, this control can be used to edit the value of an attribute of this target element.attribute_name
Unlike what happens with a date-field, the same date format is used to display the value on screen and to store it in the XML document. This allows to use a date-time-picker
for data types other than those deriving from xs:dateTime
.
Example:
<xs:element name="dateTime31" type="DateTime31" /> ... <xs:complexType name="DateTime31"> <xs:attribute name="value" type="DateTime41" default="1315 03/16/1960" /> </xs:complexType> <xs:simpleType name="DateTime41"> <xs:restriction base="xs:token"> <xs:pattern value="\d\d\d\d \d\d/\d\d/\d\d\d\d" /> </xs:restriction> </xs:simpleType>
may be edited using:
dateTime31 { content: date-time-picker(attribute, value, format, pattern, pattern, "HHmm MM/dd/yyyy", language, en, country, "US"); }
Key | Value | Default | Description |
---|---|---|---|
attribute | Qualified name of attribute to be edited | No default | Without this parameter, the control is used to edit the value of the element for which the control has been generated. |
columns | Positive integer | Depends on format and on pattern . | Width of the text field in characters. |
format | standard | standard-omit-time-zone | pattern | seconds-since-epoch | millis-since-epoch | standard-omit-time-zone | Specifies the format of the date/time value.
|
pattern | Pattern supported by java.text.SimpleDateFormat | A default, short, pattern depending on the locale being used. | Specifies the format of the date. Ignored unless |
language | Lower-case, two-letter codes as defined by ISO-639. Example: "es". | Language of default locale. | Participates in specifying the locale to use. |
country | Upper-case, two-letter codes as defined by ISO-3166. Example: "ES". | Country of default locale. | Participates in specifying the locale to use. |
variant | Vendor or browser-specific code. Example: "Traditional_WIN". | Variant of default locale. | Participates in specifying the locale to use. |
Key
, value
, ..., key
, value
may also specify style parameters.
Examples:
dateTime30 { content: date-time-picker(attribute, value, format, standard, columns, 25); } dateTime41 { content: date-time-picker(format, pattern, pattern, "HHmm MM/dd/yyyy", language, en, country, "US"); } dateTime43 { content: date-time-picker(format, millis-since-epoch); }