logo

/Time Picker|v2.0.3

Class

new TimePicker(container, options)index.jsline 87

PARAMETERS
NameTypeDescription

container

stringHTMLElement

Container element or selector

options

[ Object ]

Options for initialization

PROPERTIES
NameTypeDescription

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.

meridiemPosition

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
var timepicker = new tui.TimePicker('#timepicker-container', {
    initialHour: 15,
    initialMinute: 13,
    inputType: 'selectbox',
    showMeridiem: false
});

Static Properties

localeTexts:

object

index.jsline 107

Locale text data

EXAMPLES
var TimePicker = tui.TimePicker; // or require('tui-time-picker');

TimePicker.localeTexts['customKey'] = {
    am: 'a.m.',
    pm: 'p.m.'
};

var instance = new tui.TimePicker('#timepicker-container', {
    language: 'customKey',
});

Instance Methods

changeLanguage(language)index.jsline 662

Change locale text of meridiem by language code

PARAMETERS
NameTypeDescription

language

string

Language code

destroy()index.jsline 670

Destroy

getHour()index.jsline 646

Get hour

RETURNS:
{

number

} - hour - (0~23)

getHourStep()index.jsline 561

Get step of hour

RETURNS:
{

number

} - Step of hour

getMinute()index.jsline 654

Get minute

RETURNS:
{

number

} - minute

getMinuteStep()index.jsline 578

Get step of minute

RETURNS:
{

number

} - Step of minute

hide()index.jsline 592

Hide time picker element

setHour(hour)index.jsline 601

Set hour

PARAMETERS
NameTypeDescription

hour

number

for time picker - (0~23)

RETURNS:
{

boolean

} - result of set time

setHourStep(step)index.jsline 552

Set step of hour

PARAMETERS
NameTypeDescription

step

array

Step to create items of hour

setMinute(minute)index.jsline 610

Set minute

PARAMETERS
NameTypeDescription

minute

number

for time picker

RETURNS:
{

boolean

} - result of set time

setMinuteStep(step)index.jsline 569

Set step of minute

PARAMETERS
NameTypeDescription

step

array

Step to create items of minute

setTime(hour, minute)index.jsline 619

Set time

PARAMETERS
NameTypeDescription

hour

number

for time picker - (0~23)

minute

number

for time picker

show()index.jsline 585

Show time picker element

Events

changeindex.jsline 636

Change event - TimePicker

Resizable