class SAPO.Component.TimePicker
Allows mouse selection of time (as a shortcut). The idea is to keep the user be able to type a different time, but accelerate input tasks on most cases.
Authors:
jose.p.dias AT co.sapo.pt requires SAPO.Dom.Css requires SAPO.Dom.Element requires SAPO.Dom.Event requires SAPO.Utility.TimeEvent
Version:
0.1
Since:
January 2012
Defined in Component/TimePicker/0.1/lib.js

Constructor Summary
TimePicker (String|DOMElement ctn, Object opts)

Function Summary
returns the value of the input
Boolean isValid()
returns true iif input valis is a valid time (HH:MM)
use to set the input's value

Constructor Details

constructor TimePicker

TimePicker(String|DOMElement ctn, Object opts)
Parameters:
ctn - element which will be populated with the timepicker
opts
  • [ String value ] - initial value. default is ''
  • [ Number deltaMinutes ] - number of minutes between each choice. default is 30
  • [ String from ] - initial time (HH:MM). default is 8:00
  • [ String to ] - final time (HH:MM). default is 19:00
  • [ String inputId ] - id to assign to the input element
  • [ Number defaultWidth ] - width to use in pixels if could not determine it automatically

Function Details

function getValue

String getValue()
returns the value of the input

function isValid

Boolean isValid()
returns true iif input valis is a valid time (HH:MM)

function setValue

setValue(String t)
use to set the input's value
Parameters:
t - value to set the input to