Calendar

A calendar displays a 'flat' calendar and allows user to select a day from it.

<hbox>
    <calendar id="cal" onChange="in.value = cal.value"/>    
    <datebox id="in" onChange="cal.value = in.value"/>    
</hbox>

The value Property and the onChange Event

Like input controls, calendar supports the value property to let developers set and retrieve the selected day. In addition, developers could listen to the onChange event to process it immediately, if necessary.

The compact Property

A calendar supports two different layouts and you can control it by use of the compact property.

<calendar compact="true"/>

The default value depends on the current Locale.