문서 날짜와 시간

UICalendar

달력에서 날짜 하나를 선택합니다.

기본 사용법

월간 달력에서 날짜 선택

상단의 연도와 월이 표시된 제목을 눌러 다른 연도와 월로 이동합니다. 날짜를 누르면 v-model에 반영됩니다.

<script setup lang="ts">
import { UICalendar, type UIDateValue } from "@connextable/ui";
import { ref } from "vue";

const selected = ref<UIDateValue | null>(null);
const initial = { year: 2026, month: 8, day: 24 };
</script>

<template>
  <UICalendar
    v-model="selected"
    :default-highlighted-value="initial"
    label="배포 달력"
  />
</template>

설정과 동작

날짜와 방문 시간 고르기

v-model:time을 연결해 달력에서 날짜를 고르고 아래 목록에서 시와 분을 선택합니다.

주 단위 보기

default-view를 week로 지정하면 한 주를 먼저 표시합니다. 이전과 다음 버튼으로 주를 이동합니다.

선택을 제한한 날짜

8월 24일을 선택할 수 없는 날짜로 표시합니다.

월을 찾는 연도 뷰

이전과 다음 연도로 이동하고 월을 선택합니다.

실전 예제

입력과 달력의 날짜 제출

날짜 입력과 달력이 선택값을 공유합니다. 제출한 날짜는 values.releaseDate에서 읽습니다.

구성 컴포넌트

구조와 배치

UICalendarContent

트리거 또는 현재 값에 연결된 콘텐츠를 담습니다.

월을 찾는 연도 뷰 예제
UICalendarGrid

항목을 행과 열에 배치하는 영역입니다.

월을 찾는 연도 뷰 예제

값 입력과 선택

UICalendarCell

그리드에서 선택하거나 탐색할 항목입니다.

월을 찾는 연도 뷰 예제
UICalendarMonthCell

연간 보기에서 특정 월을 선택하는 셀입니다.

월을 찾는 연도 뷰 예제
UICalendarInput

선택한 날짜를 제출하는 숨은 폼 입력입니다.

입력과 달력의 날짜 제출 예제

탐색과 동작

UICalendarPreviousWeek

직전 주로 이동합니다.

UICalendarNextWeek

다음 주로 이동합니다.

UICalendarPreviousMonth

직전 달로 이동합니다.

월을 찾는 연도 뷰 예제
UICalendarNextMonth

다음 달로 이동합니다.

월을 찾는 연도 뷰 예제
UICalendarPreviousYear

직전 연도로 이동합니다.

월을 찾는 연도 뷰 예제
UICalendarNextYear

다음 연도로 이동합니다.

월을 찾는 연도 뷰 예제
UICalendarWeekViewTrigger

주 단위 보기로 전환합니다.

UICalendarMonthViewTrigger

월 단위 보기로 전환합니다.

UICalendarYearViewTrigger

연 단위 보기로 전환합니다.

월을 찾는 연도 뷰 예제

주요 API

속성과 모델

v-model타입DateValue | null | undefined

선택한 날짜 또는 비어 있는 값을 연결합니다.

날짜와 방문 시간 고르기 예제
v-model:time타입UITimeValue | null

달력 아래의 시간 선택을 연결합니다. null로 연결하면 미선택 상태로 시와 분 목록을 표시합니다. 폼의 날짜 입력 이름과 시간 모델은 독립적입니다.

날짜와 방문 시간 고르기 예제
time-precision타입TimeFieldPrecision | undefined

시간 열의 정밀도입니다. 기본값은 minute입니다.

time-policies타입TimeFieldPolicies | undefined

선택할 수 있는 시간의 최솟값과 최댓값 경계를 설정합니다.

default-view타입CalendarViewMode | undefined

처음 표시할 달력 보기 단위입니다.

주 단위 보기 예제

입력 상태

readonly타입boolean

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

disabled타입boolean

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

슬롯

#default타입(props: CalendarRootSlotProps) => VNodeChild

현재 보기의 dates와 view를 읽습니다.

월을 찾는 연도 뷰 예제
전체 속성, 이벤트와 슬롯

UICalendar

model-value
DateValue | null | undefined
default-value
DateValue | null | undefined
highlighted-value
DateValue | undefined
default-highlighted-value
DateValue | undefined
reference-date
DateValue | undefined
default-view
CalendarViewMode | undefined
disabled
boolean | undefined
readonly
boolean | undefined
required
boolean | undefined
label
string | undefined
policies
CalendarPolicies | undefined
@update:model-value
(value: DateValue | null) => any
@update:highlighted-value
(value: DateValue) => any
name
string | undefined
form
string | undefined
time-precision
TimeFieldPrecision | undefined
time-policies
TimeFieldPolicies | undefined
time
TimeValue | null | undefined
@update:time
(time: TimeValue | null) => void
clearable
boolean | undefined
clear-label
string | undefined
#default
(props: CalendarRootSlotProps) => VNodeChild

UICalendarContent

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: PickerRootSlotProps<DateValue | null>) => VNodeChild

UICalendarGrid

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: PickerRootSlotProps<DateValue | null>) => VNodeChild

UICalendarCell

as
PrimitiveAs | undefined
as-child
boolean | undefined
value필수
DateValue
#default
(props: PickerCellSlotProps) => VNodeChild

UICalendarMonthCell

as
PrimitiveAs | undefined
as-child
boolean | undefined
value필수
CalendarMonthValue
#default
(props: PickerMonthCellSlotProps) => VNodeChild

UICalendarInput

name
string | undefined
form
string | undefined
readonly
boolean | undefined
as
PrimitiveAs | undefined
as-child
boolean | undefined

UICalendarPreviousWeek

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: PickerRootSlotProps<DateValue | null>) => VNodeChild

UICalendarNextWeek

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: PickerRootSlotProps<DateValue | null>) => VNodeChild

UICalendarPreviousMonth

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: PickerRootSlotProps<DateValue | null>) => VNodeChild

UICalendarNextMonth

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: PickerRootSlotProps<DateValue | null>) => VNodeChild

UICalendarPreviousYear

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: PickerRootSlotProps<DateValue | null>) => VNodeChild

UICalendarNextYear

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: PickerRootSlotProps<DateValue | null>) => VNodeChild

UICalendarWeekViewTrigger

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: PickerRootSlotProps<DateValue | null>) => VNodeChild

UICalendarMonthViewTrigger

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: PickerRootSlotProps<DateValue | null>) => VNodeChild

UICalendarYearViewTrigger

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: PickerRootSlotProps<DateValue | null>) => VNodeChild