.. title:: dojo.widget.TimePicker -- The Dojo Manual

.. this is a comment. for more information on reST, see:
   http://docutils.sf.net/docs/user/rst/quickstart.html
   http://docutils.sf.net/docs/user/rst/quickref.html

Name
===============================================================================

dojo.widget.html.TimePicker - Base class for a stand-alone TimePicker widget
that makes it easy to select a time.

Summary and Overview
===============================================================================

Base class for a current HTML TimePicker, see dojo.widget.html.TimePicker

Usage
===============================================================================

::

  var timePicker = dojo.widget.createWidget("TimePicker", {},  
  dojo.byId("timePickerNode"));

or::

  <div dojoType="TimePicker"></div>

API Reference
===============================================================================

Properties
---------------------------------------

``widgetType``:

    widgetType is set to TimePicker

``isContainer``:

    isContainer is set to false as the TimePicker does not currently support 
    the nesting of other widgets.


Methods
---------------------------------------

    	none

Classes
---------------------------------------

``util``

    Utility collection for any convenience methods specific to a TimePicker, 
    	but not specific to an instance..

Methods
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``toRfcDate(jsDate)``:

    Convert a JavaScript date object, jsDate, to an `RFC 3339`_ date format. If 
    no jsDate is passed in, it converts the value of today.  There is currently 
    little attempt to validate the date inside this method.  Seconds are always
    set to "00" since the UI does not support setting seconds.

    ``jsDate``:
        A JavaScript Date object instance

    *returns*:
        an `RFC 3339`_ date

``fromRfcDate(rfCDate)``:

    Converts an `RFC 3339`_ date string to a JavaScript Date object instance.

    ``rfcDate``:
        A string representing an `RFC 3339`_ formatted date.

    *returns*:
        a JavaScript Date object instance representing the value passed in by 
        rfcDate, or today if rfcDate is not valid.  It always returns today's 
        Date, but with the correct date and time, since this function is 
        intended to only be concerned with time information.

``toAmPmHour(hour)``:

    This method accepts a 24 hour clock hour and returns an Array of the hour 
    	on the AM/PM scale, and a boolean that is true if AM, or false if PM

    ``hour``:
        Integer between 0 and 23

    *returns*:
        An Array of the hour on the AM/PM scale, and a boolean that is true if 
    			AM, or false if PM

``fromAmPmHour(amPmHour, isAm)``:

    This method accepts an AM/PM hourand a boolean that is true if AM, or false if PM, and returns a 24-hour hour.

    ``asPmHour``:
        Integer between 1 and 12

    ``isAm``:
        boolean, true if AM, false if PM
    			
    *returns*:
        An interger between 0 and 23 representing the hour on the 24 hour scale.

Requires
===============================================================================

- `dojo.widget.DomWidget`_

.. _`dojo.widget.DomWidget`:	widget/DomWidget.html

Provides
===============================================================================

dojo.widget.TimePicker
    A class constructor that allows a widget of type 
    dojo.widget.TimePicker to be created.

dojo.widget.TimePicker
    Singleton utility collection for any convenience methods specific to a
    TimePicker.

About
===============================================================================

:Author: Dylan Schiemann
:Version: 0.2
:Copyright: Dojo Foundation, 2005
:Date: 2005/12/30

.. vim:ts=4:et:tw=80:shiftwidth=4:
