logo

/Time Picker|v1.5.1

Class

new TimePicker(container, options)index.jsline 70

PARAMETERS
NameTypeDescription

container

stringjQueryHTMLElement

Container element

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 89

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 606

Change locale text of meridiem by language code

PARAMETERS
NameTypeDescription

language

string

Language code

destroy()index.jsline 614

Destroy

getHour()index.jsline 590

Get hour

RETURNS:
{

number

} - hour - (0~23)

getHourStep()index.jsline 501

Get step of hour

RETURNS:
{

number

} - Step of hour

getMinute()index.jsline 598

Get minute

RETURNS:
{

number

} - minute

getMinuteStep()index.jsline 518

Get step of minute

RETURNS:
{

number

} - Step of minute

hide()index.jsline 532

Hide time picker element

setHour(hour)index.jsline 541

Set hour

PARAMETERS
NameTypeDescription

hour

number

for time picker - (0~23)

RETURNS:
{

boolean

} - result of set time

setHourStep(step)index.jsline 492

Set step of hour

PARAMETERS
NameTypeDescription

step

array

Step to create items of hour

setMinute(minute)index.jsline 550

Set minute

PARAMETERS
NameTypeDescription

minute

number

for time picker

RETURNS:
{

boolean

} - result of set time

setMinuteStep(step)index.jsline 509

Set step of minute

PARAMETERS
NameTypeDescription

step

array

Step to create items of minute

setTime(hour, minute)index.jsline 559

Set time

PARAMETERS
NameTypeDescription

hour

number

for time picker - (0~23)

minute

number

for time picker

show()index.jsline 525

Show time picker element

Events

changeindex.jsline 580

Change event - TimePicker

Resizable