Skip to content

Kirby 3.6.6

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
Supported values:
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 unit and a size key
Example:
{ 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
  • Object part
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
  • Number index
Selects the next pattern if available
selectPrev
  • Number index
Selects the previous pattern if available

Events

Event Description Passes
focus
input
invalid
  • undefined
submit

CSS classes

.k-time-input