XUL:Specs:DateTimePickers: Difference between revisions

no edit summary
No edit summary
Line 12: Line 12:
<pre>
<pre>
&lt;timepicker value="13:15"
&lt;timepicker value="13:15"
              increment="10"
            increment="10"
              hideseconds="false"&gt;
            hideseconds="false"/&gt;
</pre>
</pre>


Line 40: Line 40:


The change event is fired whenever the time is changed.
The change event is fired whenever the time is changed.
==Date Picker==
A widget for selecting dates. There are three varieties, chosen by setting the type attribute. The default datepicker, if no type attribute is present, is an entry datepicker. Other types are grid and popup.
*entry - contains a textbox with a spinbuttons next to it and works like the timepicker but for entering the year, month and date.
*grid - a calendar grid for selecting a date. The mouse may be used to click on a date or the keyboard may be used to navigate to a date.
*popup - a combination entry field with a dropdown button. Pressing the dropdrop button opens a popup with the grid in it.
<pre>
&lt;datepicker type="grid"
            value="Jul 20, 2005"
            hideyear="false"/&gt;
</pre>
; hideyear : set to true to hide the year entry field. This would be used, for example, for birthday fields where the year is not always relevant.
; type : either grid or popup
; value : the default date to be set for the datepicker.
Properties:
; value : the current value selected in the datepicker as a Date object.
; year : the currently selected year from 1 to 9999.
; month : the currently selected minute from 0 to 11.
; date : the currently selected second from 1 to 31.
; hideyear : set to true to hide the year entry field.
All of the properties above may be modified to change the current date.
Methods:
; decrease : decrease the currently focused field by 1.
; increase : increase the currently focused field by 1.
Events
The change event is fired whenever the date is changed.
287

edits