UI.Calendar - Calendar/widget container

Synopsis

<table class="uicalendar" ui:month="8" ui:year="2006">
</table>

Description

UI.Calendar is, at the same time, a simple HTML date picker widget and a container very useful for displaying date-based information.

Dependencies

Overview

[TODO]

[Calendar months goes from 1 = January to 12 = December. Note the difference with Date.prototype.getMonth() wich start counting from 0.

On the other hands, days of week ranges from 0 to 6. ]

API Reference

Class UI.Calendar

The calendar widget.

Inherits from UI.Widget.

UI.Calendar(element, year=null, month=null)

Creates a Calendar, wrapping the element DOM table element. If year and month are provided, the calendar start showing that month of that year.

Properties

UI.Calendar.prototype.element:

The div element wrapped by the form. Read-only

UI.Calendar.prototype.year:

The year shown on the calendar. Read-only

UI.Calendar.prototype.month:

The year shown on the calendar. Read-only

UI.Calendar.prototype.firstDayOfWeek:

The first day of the week. [FIXME doc]

UI.Calendar.prototype.showHeader

Whether the calendar header (month name, year, etc) should be visible or not.

Signals

drawn:

Fired when the calendar is drawn. It happens where the month is changed, for example.

Static variables

Note: You don't want to modify this variables.

UI.Calendar.dayNames, mochidef:UI.Calendar.dayShortNames:

Arrays of strings containing the long and short names of the days of the week.

UI.Calendar.monthNames:

Array of strings containing the month names.

UI.Calendar.monthDaysNormalYear, UI.Calendar.monthDaysLeapYear:

Arrays of integers containing the number of days per month in normal and leap years.

Automatic widget construction details

Calendars can be created using this HTML markup:

<div class="uicalendar" ui:year="<number>" ui:month="<number>"
ui:firstDayOfWeek="<number>" ui:showHeader="<boolean>"

System Message: WARNING/2 (<string>, line 124)

Definition list ends without a blank line; unexpected unindent.

</div>

Where [TODO: Attributes explanation]

Authors

Copyright

Copyright 2005-2006 Leonardo Soto M. <leo.soto@gmail.com> and Imagemaker IT <http://www.imagemaker.cl>.

This program is licensed under the CDDL v1.0 license, see http://www.sun.com/cddl/cddl.html.