behavior: date

Date input element behavior.

Example:

<input type="date" name="date1" value="2004-01-24" />

Date element is sensitive to current user' locale settings, e.g. it will use localized names of months and week days and month/day/year order in the editing portion of the element.

Elements

that have this behavior applied by default (see master style sheet):

  • <input type=“date” /> - inline single line
  • <widget type=“date”></widget>

Attributes

that this behavior knows about:

  • value=“YYYY-MM-DD” - initial value (date) of the input element.

Events

Together with the standard set of events (mouse, keyboard, focus) behavior: date generates:

  • SELECT_SELECTION_CHANGED event - value of the element was changed due to user actions. Posted (asynchronous) event.

Value

of type json::value::T_DATE.

Special key combinations

See edit and See calendar (when popup is open)

Model

After initialization (event: attached) of the behavior it creates following DOM structure:

  • input - element this behavior attached to,
    • caption - editing portion of the element, has behavior:masked attached,
    • button - button causing popup to appear,
    • popup - popup element with behavior:calendar attached.
h-smile/built-in-behaviors/date.txt · Last modified: 2008/12/01 22:25 by andrew
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0