Time input
<k-time-input>
Form input to handle a time value. Extends k-date-input and makes sure that values get parsed and emitted as time-only ISO string HH:mm:ss
<k-input v-model="time" name="time" type="time" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| autofocus |
boolean |
– |
|
| disabled |
boolean |
– |
|
| display |
string HH, H, hh, h, mm, m, ss, s, a |
"HH:mm" |
Format to parse and display the time
Example:hh:mm a
|
| id |
number|string |
function() { return this._uid; } |
|
| max |
string |
– |
The last allowed time as ISO time string
Example:22:30:00
|
| min |
string |
– |
The first allowed time as ISO time string
Example:01:30:00
|
| required |
boolean |
– |
|
| step |
object |
{ size: 5, unit: "minute" } |
Rounding to the nearest step. Requires an object with a
Example:unit and a size key { unit: 'second', size: 15 }
|
| type |
string |
"time" |
|
| value |
string |
– |
Value must be provided as ISO time string
Example:22:33:00
|
Methods
| Method | Parameters | Description |
|---|---|---|
| focus | – | Focuses the input element |
| select |
|
Sets the cursor selection in the input element that includes the provided part |
| selectFirst | – | Selects the first pattern if available |
| selectLast | – | Selects the last pattern if available |
| selectNext |
|
Selects the next pattern if available |
| selectPrev |
|
Selects the previous pattern if available |
Events
| Event | Description | Passes |
|---|---|---|
| focus |
|
– |
| input |
|
– |
| invalid |
|
|
| submit |
|
– |
CSS classes
.k-time-input