date-field(key
, value
, ..., key
, value
)
Inserts in generated content a text field control, configured for parsing and formatting dates. This control can be used to edit the value of the element which is the target of the CSS rule. If "attribute, attribute_name
" is specified, this control can be used to edit the value of an attribute of this target element.
It is important to understand that a date-field does not validate what the user types in it. It is the schema of the document which is used for that. The date-field is just useful to convert formatted dates (example: 03/16/60) to/from the standard dates (example: 1960-03-16) which are stored in the document. In practice, this means that a date-field is unusable with DTDs which, unlike W3C XML Schema and Relax NG, cannot validate dates.
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. |
pattern | Pattern supported by java.text.DateFormat | A simple pattern which depends on data-type. | Specifies how date is to be parsed and formatted. |
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. |
data-type | date | time | dateTime | gDay | gMonthDay | gMonth | gMonthYear | gYear | date | Base data type of attribute or element value being edited. Note that default pattern for gMonthDay is |
Key
, value
, ..., key
, value
may also specify style parameters.
Example:
date-field() date-field(pattern, "yy/MM/dd hh:mm a Z", data-type, dateTime, language, en, country, "US")