Create a timepicker which can easily be used by selecting a time value from a pre filled dropdown.


To apply the timepicker, just add the data-uk-timepicker attribute to an <input> element. The timepicker will automatically display a pre filled dropdown on focus, which can be navigated by pressing the up or down button on the keyboard or by scrolling with the mouse.

IMPORTANT The timepicker component requires the Autocomplete component in order to work. Please make sure that you always include them together.



<form class="uk-form">
    <input type="text" data-uk-timepicker>

Display meridian time

To display meridian time, just define the format option and set it to 12h



<form class="uk-form">
    <input type="text" data-uk-timepicker="{format:'12h'}">

JavaScript options

This is an example of how to set options via data attribute:

Option Possible value Default Description
format '24h' or '12h' '24h' Defines the preferred time notation
start Integer between 0 and 24 0 Start time
end Integer between 0 and 24 24 End time

Init element manually

var timepicker = UIkit.timepicker(element, { /* options */ });
Last match
Suspendisse sodales, magna at dignissim cursus, velit ex porttitor eros.