behavior: date

date input element with dropdown calendar.

Elements

that have this behavior applied by default:

Model

Upon initialization the behavior creates following DOM structure:

<input>
  <caption>
    <span.year>
    <span.month>
    <span.day>
  </caption>
  <button>
</input>

Where <caption> will have behavior:masked applied. <button> triggers appearance of popup calendar.

Attributes

that this behavior knows about:

Events

Aside of standard set of events (mouse, keyboard, focus) behavior: button generates:

Value

Date or undefined, reflects current status of internal editing buffer.

Methods

showPopup()
- shows popup calendar widget.
today()
- sets current data.