문서 날짜와 시간

UITimeField

텍스트로 시간을 입력합니다.

기본 사용법

시와 분을 직접 입력

930 또는 9:30을 입력하고 Enter를 누르면 09:30으로 확정됩니다. 위아래 방향키는 커서가 놓인 단위를 조절합니다.

<script setup lang="ts">
import { UITimeField } from "@connextable/ui";

import { ref } from "vue";
const value = ref({ hour: 9, minute: 30, second: 0, millisecond: 0 });
</script>

<template>
  <label>
    <span>시작 시각</span>
    <UITimeField v-model="value" />
  </label>
</template>

설정과 동작

초 단위까지 편집

시간을 초 단위까지 편집할 수 있습니다.

시간 경계 지정

09시부터 17시까지 범위에서만 값을 확정합니다.

잘못된 분 단위 고치기

70분을 입력한 뒤 45분으로 수정하고 확정 시간을 확인합니다.

확정된 시작 시간

시작 시간을 읽을 수 있고 사용자 입력은 잠깁니다.

주요 API

속성과 모델

v-model타입TimeValue | null | undefined

확정된 시간 객체 또는 null을 연결합니다.

초 단위까지 편집 예제
default-value타입TimeValue | null | undefined

처음 표시할 시간입니다.

precision타입TimeFieldPrecision | undefined

시각에서 입력할 정밀도를 지정합니다.

초 단위까지 편집 예제

입력 상태

readonly타입boolean

값을 유지하고 사용자 조작으로 변경되는 것을 막습니다. 읽기와 탐색은 계속 지원합니다.

확정된 시작 시간 예제
disabled타입boolean

입력과 선택을 비활성화합니다. 네이티브 입력은 Tab 순서에서 빠집니다.

전체 속성, 이벤트와 슬롯

UITimeField

disabled
boolean | undefined
label
string | undefined
required
boolean | undefined
model-value
TimeValue | null | undefined
default-value
TimeValue | null | undefined
readonly
boolean | undefined
policies
TimeFieldPolicies | undefined
native
boolean | undefined
precision
TimeFieldPrecision | undefined
clearable
boolean | undefined
clear-label
string | undefined