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.
Version:
0.1
Since:
Defined in
Component/TimePicker/0.1/lib.js
January 2012
Constructor Summary
Function Summary
Boolean
isValid()
returns true iif input valis is a valid time (HH:MM)
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