2011-09-07

CSS
Hover the classes to see matching element(s) in the example
xfInput matches an Element that represents a XForms input element
xsdDate matches an Element that is bound to a node widht datatype date
xfControl matches an Element that represents a XForms control
xfLabel matches the label part of an XForms control
xfValue matches the widget part of an XForms control
xfReadOnly matches a xforms control that is currently readonly
xfReadWrite matches a xforms control that is currently writable
xfRequired matches a xforms control that is currently required
xfOptional matches a xforms control that is currently optional
xfEnabled matches a xforms control that is currently relevant (enabled)
xfDisabled matches a xforms control that is currently disabled (can't be visualized here as the control gets hidden)
xfValid matches a xforms control that is currently valid
xfInvalid matches a xforms control that is currently invalid

# Calendar input control with Date pattern

This form control enables free-form data entry or a user interface component appropriate to the datatype of the bound node.

An input which binds to a Node of type 'date' is rendered as a popup calendar control. The value may also be be typed in directly.

By setting the appearance attribute to "iso8601:datePattern" the format of the Date value can be customized. Typical format strings apply. See Dojo Docs for a full specification with examples.

| XForms 1.1 Links
Recommendation
Quick Reference

## Example

a calendar with a date pattern a Hint for this control help for input1 invalid
CurrentValue:
readonly required relevant valid now

## XForms Markup

    <xf:input id="input1" ref="input1/value" appearance="bf:iso8601" data-bf-params="date:'dd.MMMM.yyyy'" incremental="true">
        <xf:label>a calendar with a date pattern</xf:label>
        <xf:hint>a Hint for this control</xf:hint>
        <xf:help>help for input1</xf:help>
        <xf:alert>invalid</xf:alert>
    </xf:input>

## Notes

There is no way to distinguish a standard date control from one with a date pattern. If that should be essential for you please contact the betterform users mailing list.

## Limitations

The date control is currently not fully accessible esp. keyboard navigation is not working in the current version of Dojo.

Though locale-specific formatting of a date is supported there's no further support for subformats like the Java short/medium/long date formatting.

Dojo only accepts 'date'-inputs in the format of the datePattern OR the ISO8601/RFC3339 format.