new TimePicker(container, options)index.jsline 100
PARAMETERS
Name Type Description container
stringHTMLElement
Container element or selector
options
[ Object ]
Options for initialization
PROPERTIES
Name Type Description initialHour
number = 0
Initial setting value of hour
initialMinute
number = 0
Initial setting value of minute
hourStep
number = 1
Step value of hour
minuteStep
number = 1
Step value of minute
inputType
string = 'selectbox'
'selectbox' or 'spinbox'
format
string = 'h:m'
hour, minute format for display
showMeridiem
boolean = true
Show meridiem expression?
disabledHours
Array = []
Registered Hours is disabled.
disabledMinutes
Object = {}
Registered Minutes of selected hours is disabled.
PROPERTIES
Name Type Description hour
[ Object ]
Key must be hour(number).
Value is array which contains only true or false and must be 60 of lengthmeridiemPosition
string = 'right'
Set location of the meridiem element.
If this option set 'left', the meridiem element is created in front of the hour element.language
string = 'en'
Set locale texts
usageStatistics
Boolean = true|false
send hostname to google analytics default value is true
EXAMPLES
// ES6 import TimePicker from 'tui-time-picker'; // CommonJS const TimePicker = require('tui-time-picker'); // Browser const TimePicker = tui.TimePicker; const timepicker = new TimePicker('#timepicker-container', { initialHour: 15, initialMinute: 13, inputType: 'selectbox', showMeridiem: false });
Static Properties
Instance Methods
setRange(begin, end)index.jsline 672
Set selectable range
PARAMETERS
Name Type Description begin
Object
Contain begin hour and minute of range
PROPERTIES
Name Type Description hour
number
begin hour of range
minute
number
begin minute of range
end
[ Object ]
Contain end hour and minute of range
PROPERTIES
Name Type Description hour
number
end hour of range
minute
number
end minute of range