Time Picker
Scroll qilinadigan ustunli vaqt tanlagich; soat, daqiqa, sekund tanlashni va 12/24 soatlik formatni qo‘llab-quvvatlaydi.
vue
<script setup>
import { ref } from 'vue'
const time = ref('')
</script>
<template>
<VxTimePicker v-model="time" />
</template>With Seconds
vue
<template>
<VxTimePicker v-model="time" format="HH:mm:ss" />
</template>12-Hour Format
vue
<template>
<VxTimePicker v-model="time" format="hh:mm A" />
</template>Step Intervals
Soat, daqiqa yoki sekund uchun o‘zingizga kerakli qadamni belgilang.
vue
<template>
<VxTimePicker :minute-step="15" />
<!-- Shows: 00, 15, 30, 45 -->
</template>Min / Max Time
vue
<template>
<VxTimePicker min-time="09:00" max-time="18:00" />
</template>Non-editable
Click to pick
vue
<template>
<VxTimePicker :editable="false" />
</template>Disabled
14:30
vue
<template>
<VxTimePicker v-model="time" disabled />
</template>Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | string | '' | Vaqt qiymati (v-model) |
placeholder | string | 'Pick time' | Placeholder matni |
format | 'HH:mm' | 'HH:mm:ss' | 'hh:mm A' | 'hh:mm:ss A' | 'HH:mm' | Vaqt formati |
disabled | boolean | false | O‘chirib qo‘yish |
clearable | boolean | true | Tozalash tugmasi |
editable | boolean | true | Maska bilan klaviaturadan kiritishga ruxsat berish |
minTime | string | '' | Minimal vaqt (masalan, '09:00') |
maxTime | string | '' | Maksimal vaqt (masalan, '18:00') |
hourStep | number | 1 | Soat qadami |
minuteStep | number | 1 | Daqiqa qadami |
secondStep | number | 1 | Sekund qadami |
triggerClass | string | '' | Triggerning maxsus klassi |
triggerStyle | Record<string, string> | — | Triggerning maxsus uslublari |
Events
| Event | Type | Description |
|---|---|---|
update:modelValue | (value: string) => void | Vaqt o‘zgardi |
change | (value: string) => void | Vaqt o‘zgardi |