Date Picker
A neo-brutalist style date picker component family built on v-calendar and reka-ui Popover. It provides 7 ready-to-use pickers plus standalone panels and a reusable footer. Popup pickers share trigger style variants, while TimePicker uses its own layout of time dropdowns.
Demo
DatePicker 单日期选择
DatePickerRange 日期范围
DateTimePicker 日期时间
TimePicker 纯时间
WeekPicker 周选择
MonthPicker 月份
YearPicker 年份
程序化控制(通过 ref 打开面板)
通过 pickerRef.open 可在外部按钮中打开或关闭日期面板。
Installation
pnpm dlx brutx-vue@latest add date-pickerAdditional dependency required:
pnpm add v-calendarUsage
DatePicker - Single Date Selection
<script setup>
import { ref } from 'vue'
import { DatePicker } from 'brutx-ui-vue/date-picker'
const date = ref(null)
</script>
<template>
<DatePicker v-model="date" placeholder="Select date" />
</template>Trigger Accessible Names
DatePicker and DateTimePicker triggers resolve their names in this order: ariaLabelledby, explicit ariaLabel, an associated native <label>, then the localized title fallback. When both ARIA name props are unset, title uses the localized name for that picker. It can supply the accessible name when no native label is associated, and the browser may show its native tooltip. An associated label remains the name source. The visible placeholder and date value are separate from the fallback name. ariaLabelledby names only the trigger; ariaLabel also names the trigger and popup date panel.
<template>
<label for="departure-date">Departure date</label>
<DatePicker id="departure-date" v-model="date" />
</template>With Shortcuts
<script setup>
import { ref } from 'vue'
import { DatePicker } from 'brutx-ui-vue/date-picker'
const date = ref(null)
const shortcuts = [
{ label: 'Today', value: () => new Date() },
{ label: 'Tomorrow', value: () => {
const d = new Date()
d.setDate(d.getDate() + 1)
return d
}},
{ label: 'In a week', value: () => {
const d = new Date()
d.setDate(d.getDate() + 7)
return d
}},
]
</script>
<template>
<DatePicker v-model="date" :shortcuts="shortcuts" :clearable="true" />
</template>DatePickerRange - Date Range Selection
<script setup>
import { ref } from 'vue'
import { DatePickerRange } from 'brutx-ui-vue/date-picker'
const dateRange = ref(null)
</script>
<template>
<DatePickerRange
v-model="dateRange"
start-placeholder="Start date"
end-placeholder="End date"
/>
</template>DateTimePicker - Date Time Selection
<script setup>
import { ref } from 'vue'
import { DateTimePicker } from 'brutx-ui-vue/date-picker'
const dateTime = ref(null)
</script>
<template>
<DateTimePicker
v-model="dateTime"
placeholder="Select date and time"
:show-seconds="true"
/>
</template>DateTimePicker supports time step configuration:
<template>
<DateTimePicker
v-model="dateTime"
:time-step="{ hour: 2, minute: 15, second: 10 }"
/>
</template>TimePicker - Time Only Selection
TimePicker combines Select components for hours, minutes, and optional seconds, configured through disabled, showSeconds, timeStep, embedded, and ariaLabel. The popup date-picker props open, readonly, clearable, size, variant, shortcuts, minDate, maxDate, and displayFormat are not part of its public props.
<script setup>
import { ref } from 'vue'
import { TimePicker } from 'brutx-ui-vue/date-picker'
const time = ref(null)
</script>
<template>
<TimePicker v-model="time" :show-seconds="true" />
</template>WeekPicker - Week Selection
<script setup>
import { ref } from 'vue'
import { WeekPicker } from 'brutx-ui-vue/date-picker'
const week = ref(null)
</script>
<template>
<WeekPicker v-model="week" :week-starts-on="1" placeholder="Select week" />
</template>weekStartsOn: 0 = week starts on Sunday, 1 = week starts on Monday (default). After selecting any date, modelValue automatically aligns to the start of that week, and the entire week is highlighted.
Note: The
weekStartsOndefault (1, Monday) is not derived from theuseLocaleregional setting — a known limitation. ISO 8601 and Chinese regional conventions both start weeks on Monday; if your business needs Sunday as the week start (e.g. en-US convention), passweekStartsOn: 0explicitly.
MonthPicker - Month Selection
<script setup>
import { ref } from 'vue'
import { MonthPicker } from 'brutx-ui-vue/date-picker'
const month = ref(null)
</script>
<template>
<MonthPicker v-model="month" placeholder="Select month" />
</template>YearPicker - Year Selection
<script setup>
import { ref } from 'vue'
import { YearPicker } from 'brutx-ui-vue/date-picker'
const year = ref(null)
</script>
<template>
<YearPicker v-model="year" placeholder="Select year" />
</template>Disabled and Read-only
<template>
<DatePicker v-model="date" disabled />
<DatePicker v-model="date" readonly />
</template>When clearable is enabled and a value is selected, the DatePicker, DatePickerRange, DateTimePicker, MonthPicker, WeekPicker, and YearPicker trigger and separate clear button move together on hover and press. The clear icon stays aligned with the space reserved in the trigger. After keyboard clearing updates the value and removes the clear button, focus returns to the actual trigger. The clear button uses the shared keyboard focus ring. The clear button is hidden when disabled or readonly is set.
Enabling readonly while the panel is open closes it, discards selections the parent has yet to accept, and preserves the bound value. A controlled picker emits update:open(false). Once the parent sets open to false or removes the binding, turning off readonly allows the panel to open again.
For a read-only DatePickerRange, Enter and Space do not open the panel, while Tab and Shift+Tab can still move focus away from the trigger.
Date Range Constraints
<script setup>
import { ref } from 'vue'
import { DatePicker } from 'brutx-ui-vue/date-picker'
const date = ref(null)
const minDate = new Date(2026, 0, 1)
const maxDate = new Date(2026, 11, 31)
</script>
<template>
<DatePicker v-model="date" :min-date="minDate" :max-date="maxDate" />
</template>DatePicker and DateTimePicker compare shortcuts by local calendar date and ignore dates outside the allowed range. For an allowed shortcut, DateTimePicker keeps the time of the current value or uses the shortcut time when the value is empty. Times on boundary days follow minDate and maxDate, with the entire final day available when maxDate is midnight.
YearPicker makes a year selectable when it contains a time within the allowed range. Selection starts at local midnight on the existing month and day, or on today's month and day if the value is empty. February 29 becomes February 28 in a non-leap year, and the result is clamped to the part of the selected year within the allowed range.
Custom Display Format
Supports YYYY, YY, MM, DD, HH, mm, ss, WW (ISO week number) tokens:
<template>
<DatePicker v-model="date" display-format="YYYY/MM/DD" />
<DateTimePicker v-model="dt" display-format="YYYY-MM-DD HH:mm:ss" />
<WeekPicker v-model="week" display-format="YYYY-WW" />
<YearPicker v-model="year" display-format="YY" />
</template>displayFormat only affects the string shown in the input. It does not change the types of modelValue, minDate, maxDate, shortcuts, or emitted payloads; those public APIs always use Date, [Date, Date], or null. For cross-time-zone datetime consistency, normalize values in your application as Date, timestamps, or full ISO strings with explicit offsets before converting them to Date; do not rely on native parsing of arbitrary date strings.
YYYY pads shorter years with leading zeros, as in 0099 and 0999. The calendar displays and selects dates in their actual calendar year. Ranges can cross year boundaries within minDate and maxDate. The native form fields of DatePicker and DateTimePicker use the same year format. With YYYY-WW, the year is the ISO week year, and parsing returns the Monday of that week.
Setting modelValue synchronizes the display of the date pickers and their panels. Open date, date range, and date-time panels follow external changes to a different month, using the start date for a range. Changes within the same month preserve the month the user is browsing.
User selection and clearing emit update:modelValue. The range panel also uses this event to publish a preview before the end date is selected. Returning the current preview from the parent keeps the selection in progress, while supplying another range ends the preview. Confirming in a popup picker commits the current value and emits change.
Month and weekday labels and accessible date names in the date, date range, date-time, and week panels follow the useLocale() language pack. The first day of the week follows the component settings.
TimePicker and DateTimePicker edit times in the local time zone. When clocks fall back and the edited local time occurs twice, the picker keeps the previous instant's UTC offset when possible. When clocks spring forward, a local time within the skipped interval moves forward by the length of the gap, following JavaScript Date behavior.
Sub-components
| Component | Purpose |
|---|---|
DatePicker | Single date selection |
DatePickerRange | Date range selection (start and end dates) |
DateTimePicker | Date + time selection |
TimePicker | Time only selection (hours/minutes/seconds) |
WeekPicker | Week selection (full week highlight) |
MonthPicker | Month selection |
YearPicker | Year selection |
DatePickerPanel | Embeddable single-date panel |
DatePickerRangePanel | Embeddable date-range panel |
DateTimePickerPanel | Datetime panel combining a calendar and TimePicker |
WeekPickerPanel | Week panel aligning selection to the week start |
MonthPickerPanel | Month grid with year navigation |
YearPickerPanel | Year grid with configurable years per page |
DatePickerPanelFooter | Reusable Clear and Confirm buttons and their events |
Data Types
// Single date shortcut
interface DatePickerShortcut {
label: string
value: Date | (() => Date)
}
// Date range in start/end order
type DateRange = readonly [Date, Date]
// Date range shortcut
interface DatePickerRangeShortcut {
label: string
value: DateRange | (() => DateRange)
}Composables
The logic for popup panel triggering, display formatting, clearing, and confirmation in components like DatePicker has been extracted into a standalone useDatePicker composable. It can be used independently when you need to build a fully custom trigger or calendar panel. It manages the panel open/close state, synchronizes the display value with modelValue, and triggers open / close / change / update:modelValue events through the provided emit.
import { useDatePicker } from 'brutx-ui-vue/useDatePicker'
import type { UseDatePickerOptions } from 'brutx-ui-vue/useDatePicker'
const props = defineProps<{ modelValue?: Date | null }>()
const emit = defineEmits<{
'update:modelValue': [value: Date | null]
'change': [value: Date | null]
'open': []
'close': []
}>()
const {
open, // Whether the panel is open
displayValue, // Current displayed value in the panel (temporary value before confirmation)
formattedDisplay, // Formatted display string
handlePanelUpdate, // Panel value update callback
handlePanelConfirm, // Panel confirm callback
handlePanelClear, // Panel clear callback
handleClearClick, // Trigger clear button click callback
handleTriggerKeydown, // Trigger keyboard event callback
} = useDatePicker({
modelValue: () => props.modelValue ?? null,
displayFormat: 'YYYY-MM-DD',
disabled: false,
readonly: false,
emit,
})UseDatePickerOptions
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | MaybeRefOrGetter<Date | null> | null | Currently selected date (supports v-model) |
displayFormat | MaybeRefOrGetter<string> | 'YYYY-MM-DD' | Display format (supports YYYY, YY, MM, DD, HH, mm, ss, WW tokens) |
disabled | MaybeRefOrGetter<boolean> | false | Whether disabled |
readonly | MaybeRefOrGetter<boolean> | false | Closes the panel and blocks opening, selection, confirmation, and clearing |
openProp | MaybeRefOrGetter<boolean | undefined> | undefined | Controlled open state; omitted values use internal state |
emitUpdateOpen | (value: boolean) => void | — | Called on open-state requests to synchronize controlled state with openProp |
emit | DatePickerEmit | — | Event emission function (required, type consistent with component emits) |
Return Values
| Prop | Type | Description |
|---|---|---|
open | Ref<boolean> | Whether the panel is open |
displayValue | Readonly<Ref<Date | null>> | Current panel selection, read-only to the caller |
formattedDisplay | ComputedRef<string> | Formatted string according to displayFormat |
handlePanelUpdate(value) | (value: Date | null) => void | Called when the panel value updates, synchronizes displayValue and triggers update:modelValue |
handlePanelConfirm(value) | (value: Date | null) => void | Called when the panel is confirmed, triggers update:modelValue / change and closes the panel |
handlePanelClear() | () => void | Called when the panel is cleared, triggers update:modelValue(null) / change(null) |
handleClearClick(event) | (event: Event) => void | Trigger clear callback, stops propagation and clears the value |
handleTriggerKeydown(event) | (event: KeyboardEvent) => void | Prevents Enter / Space defaults when disabled or read-only; the trigger primitive handles ordinary opening |
Note:
emitmust conform to theDatePickerEmitsignature. Call the composable withinsetup()or a managed Vue effect scope so its reactive watchers are disposed of appropriately.
Programmatic Control
DatePicker, DateTimePicker, WeekPicker, MonthPicker, and YearPicker expose an open reactive ref via defineExpose, allowing parent components to programmatically open or close the date panel. open is a writable reference bound to the internal Popover. Controlled writes emit update:open and take effect when the parent updates open. readonly blocks requests to open the panel internally.
Note:
DatePickerRangeandTimePickerdo not exposeopen.DatePicker,DateTimePicker,WeekPicker,MonthPicker, andYearPickeralso supportv-model:opentwo-way binding. Usingv-model:openis recommended over directly manipulating the ref.
<script setup>
import { ref } from 'vue'
import { DatePicker } from 'brutx-ui-vue/date-picker'
import { Button } from 'brutx-ui-vue/button'
const pickerRef = ref()
const date = ref(null)
</script>
<template>
<DatePicker ref="pickerRef" v-model="date" />
<Button @click="pickerRef && (pickerRef.open = true)">Open Panel</Button>
<Button @click="pickerRef && (pickerRef.open = false)">Close Panel</Button>
</template>API Reference
DatePicker
| Name | Type | Default | Description |
|---|---|---|---|
size | "default" | "lg" | "sm" | undefined | "default" | Controls the date trigger height, padding, and icon dimensions. |
DetailsDeclared typeNonNullable<"default" | "lg" | "sm" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DatePicker.vue | |||
variant | "default" | "error" | "success" | undefined | "default" | Controls the date trigger appearance, with default, error, and success colors. |
DetailsDeclared typeNonNullable<"default" | "success" | "error" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DatePicker.vue | |||
modelValueNullable | Date | null | undefined | null | The selected single date, bound with v-model. null represents an empty or cleared selection. |
DetailsDeclared typeDate | null | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
placeholder | string | undefined | undefinedRuntime fallback: | Placeholder text in the trigger when there is no date to display. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
shortcuts | DatePickerShortcut[] | undefined | []Factory evaluated per instance | Shortcut options in the date panel. Each supplies a label and a Date or function returning a Date; selected shortcuts must satisfy the date bounds. |
DetailsDeclared typeDatePickerShortcut[] | undefined Referenced types DatePickerShortcut Type definition — DatePickerShortcutexport interface DatePickerShortcut {
label: string
value: Date | (() => Date)
}Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
ariaLabelledby | string | undefined | undefined | References the date trigger accessible name by element ID and takes precedence over ariaLabel. It applies only to the trigger; the panel name still comes from ariaLabel or its localized fallback. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
open | boolean | undefined | undefinedRuntime fallback: | The controlled panel open state. Use v-model:open to apply open-state requests emitted by the component. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
displayFormat | string | undefined | "YYYY-MM-DD" | Formats the date text shown in the trigger using YYYY, YY, MM, DD, HH, mm, ss, and WW, while keeping the bound value as a Date. WW uses ISO week numbers; when the format contains weeks but no month or day tokens, the year is the ISO week year. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
minDate | Date | undefined | undefined | The earliest selectable date passed to the calendar. Single-date shortcuts are compared by local calendar date, and values before this day are ignored. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
maxDate | Date | undefined | undefined | The latest selectable date passed to the calendar. Single-date shortcuts are compared by local calendar date, and values after this day are ignored. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
disabled | boolean | undefined | false | Disables the trigger and hides its clear button. Pickers with a hidden form field also disable that field. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
readonly | boolean | undefined | false | Closes the panel, blocks opening, selection, confirmation, and clearing, and preserves the current bound value. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
clearable | boolean | undefined | false | Shows the panel footer with Clear and Confirm actions. The trigger also shows a clear button when it has a value and is neither disabled nor read-only. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
name | string | undefined | undefined | The native form field name. When provided, a hidden field submits the date as YYYY-MM-DD, an empty string for an empty value, and nothing when disabled. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
id | string | undefined | undefined | The HTML ID assigned to the date trigger button for labels or assistive-technology references. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | Explicitly sets the accessible name of the date trigger and panel. For the trigger, it follows ariaLabelledby and takes precedence over an associated native label. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
class | string | undefined | undefined | Additional CSS classes merged into the date trigger button. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: Date | null] | Emitted when a date is selected, confirmed, or cleared, updating v-model. Clearing emits null. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/DatePicker.vue | ||
@open | [] | Emitted when the panel state becomes open. Its displayed selection is reinitialized from the current modelValue. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/DatePicker.vue | ||
@close | [] | Emitted when the panel state becomes closed. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/DatePicker.vue | ||
@update:open | [value: boolean] | Emitted when the component requests an open-state update for v-model:open. During normal interaction, the parent updates open. Enabling readonly or disabled closes the panel immediately and emits a close request. |
DetailsDeclared type[value: boolean] Literal values
Sourcepackages/ui/src/components/date-picker/DatePicker.vue | ||
@change | [value: Date | null] | Emitted immediately on confirmation or clearing. On other closes, it is emitted only if the panel selection and the current modelValue have different timestamps. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/DatePicker.vue | ||
| Name | Signature or type | Description |
|---|---|---|
open | boolean | A writable reference to the panel open state. Assigning through the component instance requests opening or closing; readonly blocks opening requests. Controlled writes emit update:open and require the parent to update open. |
DetailsDeclared typeboolean Literal values
Sourcepackages/ui/src/components/date-picker/DatePicker.vue | ||
DatePickerPanel
| Name | Type | Default | Description |
|---|---|---|---|
modelValueNullable | Date | null | undefined | null | The currently selected date in the standalone panel, synchronized with the caller through v-model. |
DetailsDeclared typeDate | null | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerPanel.vue | |||
minDate | Date | undefined | undefined | The earliest selectable date passed to the calendar. Single-date shortcuts are compared by local calendar date, and values before this day are ignored. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerPanel.vue | |||
maxDate | Date | undefined | undefined | The latest selectable date passed to the calendar. Single-date shortcuts are compared by local calendar date, and values after this day are ignored. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerPanel.vue | |||
shortcuts | DatePickerShortcut[] | undefined | []Factory evaluated per instance | Labeled date shortcuts in the panel sidebar, supplied as Dates or functions returning Dates. Shortcut values outside the date bounds are ignored. |
DetailsDeclared typeDatePickerShortcut[] | undefined Referenced types DatePickerShortcut Type definition — DatePickerShortcutexport interface DatePickerShortcut {
label: string
value: Date | (() => Date)
}Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerPanel.vue | |||
clearable | boolean | undefined | true | Shows the panel footer containing Clear and Confirm buttons. Turning it off hides both buttons. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerPanel.vue | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | The accessible name of the date panel dialog. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerPanel.vue | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: Date | null] | Emitted when the panel selection changes. Clearing emits null; the parent must apply updates to keep the selected state synchronized. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/DatePickerPanel.vue | ||
@clear | [] | Emitted when the panel Clear button is clicked, followed by update:modelValue(null). |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/DatePickerPanel.vue | ||
@confirm | [value: Date | null] | Emitted when the panel Confirm button is clicked, carrying the current modelValue, including null when nothing is selected. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/DatePickerPanel.vue | ||
DatePickerRange
| Name | Type | Default | Description |
|---|---|---|---|
size | "default" | "lg" | "sm" | undefined | "default" | Controls the date trigger height, padding, and icon dimensions. |
DetailsDeclared typeNonNullable<"default" | "lg" | "sm" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerRange.vue | |||
variant | "default" | "error" | "success" | undefined | "default" | Controls the date trigger appearance, with default, error, and success colors. |
DetailsDeclared typeNonNullable<"default" | "success" | "error" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerRange.vue | |||
modelValueNullable | DateRange | null | undefined | null | The current readonly tuple of start and end dates, bound with v-model. null represents an empty range. |
DetailsDeclared typeDateRange | null | undefined Literal values
Referenced types DateRange Type definition — DateRangeexport type DateRange = readonly [Date, Date] Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
startPlaceholder | string | undefined | undefinedRuntime fallback: | Text shown in the start-date position when no complete date range is available. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
endPlaceholder | string | undefined | undefinedRuntime fallback: | Text shown in the end-date position when no complete date range is available. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
separator | string | undefined | undefinedRuntime fallback: | Separator text displayed between the start and end dates or their placeholders. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
shortcuts | DatePickerRangeShortcut[] | undefined | []Factory evaluated per instance | Date-range shortcuts containing a label and a start/end tuple or a function returning one. Selecting a shortcut directly updates the range. |
DetailsDeclared typeDatePickerRangeShortcut[] | undefined Referenced types DatePickerRangeShortcut Type definition — DatePickerRangeShortcutexport interface DatePickerRangeShortcut {
label: string
value: DateRange | (() => DateRange)
}Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
displayFormat | string | undefined | "YYYY-MM-DD" | Formats the start and end dates separately with YYYY, YY, MM, DD, HH, mm, ss, and WW, while preserving the DateRange value. WW follows ISO week-number and week-year rules. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
minDate | Date | undefined | undefined | The earliest selectable date passed to the range calendar. Shortcut ranges are emitted directly, so the caller must supply shortcuts within the bounds. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
maxDate | Date | undefined | undefined | The latest selectable date passed to the range calendar. Shortcut ranges are emitted directly, so the caller must supply shortcuts within the bounds. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
disabled | boolean | undefined | false | Disables the range trigger and hides its clear button. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
readonly | boolean | undefined | false | Closes the panel, blocks opening, selection, confirmation, and clearing, and preserves the current bound value. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
clearable | boolean | undefined | false | Shows the panel footer with Clear and Confirm actions. The trigger also shows a clear button when it has a value and is neither disabled nor read-only. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
name | string | undefined | undefined | The native name attribute passed to the range trigger button. This component does not create a hidden field for submitting the date range. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
id | string | undefined | undefined | The HTML ID assigned to the date trigger button for labels or assistive-technology references. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | The accessible name of the range trigger and panel, configured separately from placeholder text. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
class | string | undefined | undefined | Additional CSS classes merged into the date trigger button. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: DateRange | null] | Emitted on calendar selection, range dragging, shortcut selection, confirmation, or clearing to update v-model, carrying a start/end tuple or null. |
DetailsDeclared type[value: DateRange | null] Literal values
Referenced types DateRange Type definition — DateRangeexport type DateRange = readonly [Date, Date] Sourcepackages/ui/src/components/date-picker/DatePickerRange.vue | ||
@open | [] | Emitted when the panel state becomes open. Its displayed selection is reinitialized from the current modelValue. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/DatePickerRange.vue | ||
@close | [] | Emitted when the panel state becomes closed. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/DatePickerRange.vue | ||
@change | [value: DateRange | null] | Emitted immediately when the range is confirmed or cleared. On other closes, it is emitted only if either panel endpoint differs in timestamp from the current modelValue. |
DetailsDeclared type[value: DateRange | null] Literal values
Referenced types DateRange Type definition — DateRangeexport type DateRange = readonly [Date, Date] Sourcepackages/ui/src/components/date-picker/DatePickerRange.vue | ||
DatePickerRangePanel
| Name | Type | Default | Description |
|---|---|---|---|
modelValueNullable | DateRange | null | undefined | null | The readonly start/end tuple in the standalone range panel, synchronized with v-model. null represents an empty range. |
DetailsDeclared typeDateRange | null | undefined Literal values
Referenced types DateRange Type definition — DateRangeexport type DateRange = readonly [Date, Date] Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerRangePanel.vue | |||
minDate | Date | undefined | undefined | The earliest selectable date passed to the range calendar. Shortcut ranges are emitted directly, so the caller must supply shortcuts within the bounds. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerRangePanel.vue | |||
maxDate | Date | undefined | undefined | The latest selectable date passed to the range calendar. Shortcut ranges are emitted directly, so the caller must supply shortcuts within the bounds. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerRangePanel.vue | |||
shortcuts | DatePickerRangeShortcut[] | undefined | []Factory evaluated per instance | Range shortcuts in the sidebar. Function values are resolved for display and evaluated again on selection, keeping the active highlight aligned with the emitted range. |
DetailsDeclared typeDatePickerRangeShortcut[] | undefined Referenced types DatePickerRangeShortcut Type definition — DatePickerRangeShortcutexport interface DatePickerRangeShortcut {
label: string
value: DateRange | (() => DateRange)
}Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerRangePanel.vue | |||
clearable | boolean | undefined | true | Shows the panel footer containing Clear and Confirm buttons. Turning it off hides both buttons. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerRangePanel.vue | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | The accessible name of the date-range panel dialog. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/DatePickerRangePanel.vue | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: DateRange | null] | Emitted when the calendar range changes, a selection is dragged, or a shortcut is selected, carrying a start/end tuple. Clearing emits null. |
DetailsDeclared type[value: DateRange | null] Literal values
Referenced types DateRange Type definition — DateRangeexport type DateRange = readonly [Date, Date] Sourcepackages/ui/src/components/date-picker/DatePickerRangePanel.vue | ||
@clear | [] | Emitted when the panel Clear button is clicked, followed by update:modelValue(null). |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/DatePickerRangePanel.vue | ||
@confirm | [value: DateRange | null] | Emitted on confirmation with the current start/end tuple, or null when no range is selected. |
DetailsDeclared type[value: DateRange | null] Literal values
Referenced types DateRange Type definition — DateRangeexport type DateRange = readonly [Date, Date] Sourcepackages/ui/src/components/date-picker/DatePickerRangePanel.vue | ||
DateTimePicker
| Name | Type | Default | Description |
|---|---|---|---|
size | "default" | "lg" | "sm" | undefined | "default" | Controls the date trigger height, padding, and icon dimensions. |
DetailsDeclared typeNonNullable<"default" | "lg" | "sm" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DateTimePicker.vue | |||
variant | "default" | "error" | "success" | undefined | "default" | Controls the date trigger appearance, with default, error, and success colors. |
DetailsDeclared typeNonNullable<"default" | "success" | "error" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DateTimePicker.vue | |||
modelValueNullable | Date | null | undefined | null | The selected date and time, bound with v-model. Changing the calendar date preserves the hours, minutes, and seconds of an existing value. |
DetailsDeclared typeDate | null | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
showSeconds | boolean | undefined | false | Shows the seconds selector and determines whether the default display format and hidden form value include seconds. Hiding it preserves seconds already present in the Date. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
timeStep | { hour?: number | undefined; minute?: number | undefined; second?: number | undefined; } | undefined | { "hour": 1, "minute": 1, "second": 1 }Factory evaluated per instance Runtime fallback: | Sets separate option steps for hours, minutes, and seconds. Steps are rounded down and capped at 24 for hours or 60 for minutes and seconds. A current value outside the step sequence is retained as an option. |
DetailsDeclared type{ hour?: number | undefined; minute?: number | undefined; second?: number | undefined; } | undefinedDefault value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
placeholder | string | undefined | undefinedRuntime fallback: | Placeholder text in the trigger when there is no datetime to display. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
shortcuts | DatePickerShortcut[] | undefined | []Factory evaluated per instance | Date shortcuts in the datetime panel. Shortcuts outside the allowed calendar dates are ignored. Allowed shortcuts keep the existing time or use the shortcut time when empty, subject to the datetime bounds. |
DetailsDeclared typeDatePickerShortcut[] | undefined Referenced types DatePickerShortcut Type definition — DatePickerShortcutexport interface DatePickerShortcut {
label: string
value: Date | (() => Date)
}Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
ariaLabelledby | string | undefined | undefined | References the datetime trigger accessible name by element ID and takes precedence over ariaLabel. It applies only to the trigger; the panel name still comes from ariaLabel or its localized fallback. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
open | boolean | undefined | undefinedRuntime fallback: | The controlled panel open state. Use v-model:open to apply open-state requests emitted by the component. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
displayFormat | string | undefined | undefinedRuntime fallback: | Formats the date text shown in the trigger using YYYY, YY, MM, DD, HH, mm, ss, and WW, while keeping the bound value as a Date. WW uses ISO week numbers; when the format contains weeks but no month or day tokens, the year is the ISO week year. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
minDate | Date | undefined | undefined | The earliest selectable local date. Shortcuts before this day are ignored. Updates earlier than this bound are clamped to this Date. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
maxDate | Date | undefined | undefined | The latest selectable local date. Shortcuts after this day are ignored. Updates are clamped to this bound. When its hours, minutes, and seconds are all zero, other times on the boundary day remain allowed. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
disabled | boolean | undefined | false | Disables the trigger and hides its clear button. Pickers with a hidden form field also disable that field. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
readonly | boolean | undefined | false | Closes the panel, blocks opening, selection, confirmation, and clearing, and preserves the current bound value. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
clearable | boolean | undefined | false | Shows the panel Clear button and, when a value exists and the trigger is neither disabled nor read-only, its clear button. The panel Confirm button is always shown. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
name | string | undefined | undefined | The native hidden form field name. It submits YYYY-MM-DD HH:mm or YYYY-MM-DD HH:mm:ss according to showSeconds, independently of displayFormat. Empty values submit an empty string; disabled fields are omitted. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
id | string | undefined | undefined | The HTML ID assigned to the date trigger button for labels or assistive-technology references. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | Explicitly sets the accessible name of the datetime trigger and popup panel. For the trigger, it follows ariaLabelledby and takes precedence over an associated native label. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
class | string | undefined | undefined | Additional CSS classes merged into the date trigger button. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: Date | null] | Emitted when a date is selected, confirmed, or cleared, updating v-model. Clearing emits null. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/DateTimePicker.vue | ||
@open | [] | Emitted when the panel state becomes open. Its displayed selection is reinitialized from the current modelValue. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/DateTimePicker.vue | ||
@close | [] | Emitted when the panel state becomes closed. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/DateTimePicker.vue | ||
@update:open | [value: boolean] | Emitted when the component requests an open-state update for v-model:open. During normal interaction, the parent updates open. Enabling readonly or disabled closes the panel immediately and emits a close request. |
DetailsDeclared type[value: boolean] Literal values
Sourcepackages/ui/src/components/date-picker/DateTimePicker.vue | ||
@change | [value: Date | null] | Emitted immediately on confirmation or clearing. On other closes, it is emitted only if the panel selection and the current modelValue have different timestamps. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/DateTimePicker.vue | ||
| Name | Signature or type | Description |
|---|---|---|
open | boolean | A writable reference to the panel open state. Assigning through the component instance requests opening or closing; readonly blocks opening requests. Controlled writes emit update:open and require the parent to update open. |
DetailsDeclared typeboolean Literal values
Sourcepackages/ui/src/components/date-picker/DateTimePicker.vue | ||
DateTimePickerPanel
| Name | Type | Default | Description |
|---|---|---|---|
modelValueNullable | Date | null | undefined | null | The current standalone datetime-panel value, driving both calendar and time selectors and synchronized with v-model. |
DetailsDeclared typeDate | null | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DateTimePickerPanel.vue | |||
minDate | Date | undefined | undefined | The earliest selectable local date. Shortcuts before this day are ignored. Updates earlier than this bound are clamped to this Date. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/DateTimePickerPanel.vue | |||
maxDate | Date | undefined | undefined | The latest selectable local date. Shortcuts after this day are ignored. Updates are clamped to this bound. When its hours, minutes, and seconds are all zero, other times on the boundary day remain allowed. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/DateTimePickerPanel.vue | |||
shortcuts | DatePickerShortcut[] | undefined | []Factory evaluated per instance | Labeled date shortcuts. Shortcuts outside the allowed calendar dates are ignored. Allowed shortcuts keep the existing time or use the shortcut time when empty, subject to the datetime bounds. |
DetailsDeclared typeDatePickerShortcut[] | undefined Referenced types DatePickerShortcut Type definition — DatePickerShortcutexport interface DatePickerShortcut {
label: string
value: Date | (() => Date)
}Default value details
Sourcepackages/ui/src/components/date-picker/DateTimePickerPanel.vue | |||
clearable | boolean | undefined | true | Controls visibility of the panel Clear button. The Confirm button is always shown. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DateTimePickerPanel.vue | |||
showSeconds | boolean | undefined | false | Shows a seconds selector in the embedded time picker. Hiding it preserves seconds already present in the Date. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/DateTimePickerPanel.vue | |||
timeStep | { hour?: number | undefined; minute?: number | undefined; second?: number | undefined; } | undefined | { "hour": 1, "minute": 1, "second": 1 }Factory evaluated per instance Runtime fallback: | Sets separate option steps for hours, minutes, and seconds. Steps are rounded down and capped at 24 for hours or 60 for minutes and seconds. A current value outside the step sequence is retained as an option. |
DetailsDeclared type{ hour?: number | undefined; minute?: number | undefined; second?: number | undefined; } | undefinedDefault value details
Sourcepackages/ui/src/components/date-picker/DateTimePickerPanel.vue | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | The accessible name of the datetime panel dialog. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/DateTimePickerPanel.vue | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: Date | null] | Emitted after date, time, or shortcut updates are merged and processed against the datetime bounds. Clearing emits null. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/DateTimePickerPanel.vue | ||
@clear | [] | Emitted when the panel Clear button is clicked, followed by update:modelValue(null). |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/DateTimePickerPanel.vue | ||
@confirm | [value: Date | null] | Emitted when the panel Confirm button is clicked, carrying the current modelValue, including null when nothing is selected. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/DateTimePickerPanel.vue | ||
MonthPicker
| Name | Type | Default | Description |
|---|---|---|---|
size | "default" | "lg" | "sm" | undefined | "default" | Controls the date trigger height, padding, and icon dimensions. |
DetailsDeclared typeNonNullable<"default" | "lg" | "sm" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/MonthPicker.vue | |||
variant | "default" | "error" | "success" | undefined | "default" | Controls the date trigger appearance, with default, error, and success colors. |
DetailsDeclared typeNonNullable<"default" | "success" | "error" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/MonthPicker.vue | |||
modelValueNullable | Date | null | undefined | null | The selected month represented by a Date and bound with v-model. Month selection starts with its first day, then clamps the date to the bounds. |
DetailsDeclared typeDate | null | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
placeholder | string | undefined | undefinedRuntime fallback: | Placeholder text in the trigger when there is no month to display. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
open | boolean | undefined | undefinedRuntime fallback: | The controlled panel open state. Use v-model:open to apply open-state requests emitted by the component. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
displayFormat | string | undefined | "YYYY-MM" | Formats the date text shown in the trigger using YYYY, YY, MM, DD, HH, mm, ss, and WW, while keeping the bound value as a Date. WW uses ISO week numbers; when the format contains weeks but no month or day tokens, the year is the ISO week year. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
minDate | Date | undefined | undefined | The lower month-selection bound. Months whose last calendar date precedes it are disabled, and a first-of-month value produced by selection or confirmation after year navigation is clamped to this bound. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
maxDate | Date | undefined | undefined | The upper month-selection bound. Months starting after it are disabled, and values produced by selection or confirmation after year navigation are clamped to this bound. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
disabled | boolean | undefined | false | Disables the trigger and hides its clear button. Pickers with a hidden form field also disable that field. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
readonly | boolean | undefined | false | Closes the panel, blocks opening, selection, confirmation, and clearing, and preserves the current bound value. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
clearable | boolean | undefined | false | Shows the panel footer with Clear and Confirm actions. The trigger also shows a clear button when it has a value and is neither disabled nor read-only. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
name | string | undefined | undefined | The native hidden form field name, submitting the month as YYYY-MM independently of displayFormat. Empty values submit an empty string; disabled fields are omitted. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
id | string | undefined | undefined | The HTML ID assigned to the date trigger button for labels or assistive-technology references. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | The accessible name of the month trigger and month panel. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
class | string | undefined | undefined | Additional CSS classes merged into the date trigger button. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: Date | null] | Emitted when a date is selected, confirmed, or cleared, updating v-model. Clearing emits null. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/MonthPicker.vue | ||
@open | [] | Emitted when the panel state becomes open. Its displayed selection is reinitialized from the current modelValue. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/MonthPicker.vue | ||
@close | [] | Emitted when the panel state becomes closed. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/MonthPicker.vue | ||
@update:open | [value: boolean] | Emitted when the component requests an open-state update for v-model:open. During normal interaction, the parent updates open. Enabling readonly or disabled closes the panel immediately and emits a close request. |
DetailsDeclared type[value: boolean] Literal values
Sourcepackages/ui/src/components/date-picker/MonthPicker.vue | ||
@change | [value: Date | null] | Emitted immediately on confirmation or clearing. On other closes, it is emitted only if the panel selection and the current modelValue have different timestamps. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/MonthPicker.vue | ||
| Name | Signature or type | Description |
|---|---|---|
open | boolean | A writable reference to the panel open state. Assigning through the component instance requests opening or closing; readonly blocks opening requests. Controlled writes emit update:open and require the parent to update open. |
DetailsDeclared typeboolean Literal values
Sourcepackages/ui/src/components/date-picker/MonthPicker.vue | ||
MonthPickerPanel
| Name | Type | Default | Description |
|---|---|---|---|
modelValueNullable | Date | null | undefined | null | The Date representing the selected month, whose year initializes the view. An initially empty value displays the current year. |
DetailsDeclared typeDate | null | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/MonthPickerPanel.vue | |||
minDate | Date | undefined | undefined | The lower month-selection bound. Months whose last calendar date precedes it are disabled, and a first-of-month value produced by selection or confirmation after year navigation is clamped to this bound. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/MonthPickerPanel.vue | |||
maxDate | Date | undefined | undefined | The upper month-selection bound. Months starting after it are disabled, and values produced by selection or confirmation after year navigation are clamped to this bound. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/MonthPickerPanel.vue | |||
clearable | boolean | undefined | true | Shows the panel footer containing Clear and Confirm buttons. Turning it off hides both buttons. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/MonthPickerPanel.vue | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | The accessible name of the month panel dialog. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/MonthPickerPanel.vue | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: Date | null] | Emitted when an available month is selected, using its first day clamped to the bounds. Clearing emits null. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/MonthPickerPanel.vue | ||
@clear | [] | Emitted when the panel Clear button is clicked, followed by update:modelValue(null). |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/MonthPickerPanel.vue | ||
@confirm | [value: Date | null] | Confirms the current month. If the year was changed without selecting another month, it uses the viewed year and existing month, clamped to the bounds. An empty selection emits null. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/MonthPickerPanel.vue | ||
TimePicker
| Name | Type | Default | Description |
|---|---|---|---|
modelValueNullable | Date | null | undefined | null | The Date carrying hours, minutes, and seconds, bound with v-model. Changing one part preserves the date and other parts. An empty value displays zero and uses local midnight today as the base for the first selection. |
DetailsDeclared typeDate | null | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/TimePicker.vue | |||
showSeconds | boolean | undefined | false | Shows the seconds selector. Hiding it does not reset seconds already present in the Date. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/TimePicker.vue | |||
timeStep | { hour?: number | undefined; minute?: number | undefined; second?: number | undefined; } | undefined | { "hour": 1, "minute": 1, "second": 1 }Factory evaluated per instance Runtime fallback: | Sets separate option steps for hours, minutes, and seconds. Steps are rounded down and capped at 24 for hours or 60 for minutes and seconds. A current value outside the step sequence is retained as an option. |
DetailsDeclared type{ hour?: number | undefined; minute?: number | undefined; second?: number | undefined; } | undefinedDefault value details
Sourcepackages/ui/src/components/date-picker/TimePicker.vue | |||
disabled | boolean | undefined | false | Disables every time dropdown and prevents hour, minute, and second selection callbacks from updating the value. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/TimePicker.vue | |||
embedded | boolean | undefined | false | Uses the layout and border styling intended for embedding inside a datetime panel. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/TimePicker.vue | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | The accessible name of the group containing the time selectors. Individual dropdowns retain their localized time-part labels. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/TimePicker.vue | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: Date | null] | Emitted immediately when an hour, minute, or second is selected, carrying the updated Date for v-model synchronization. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/TimePicker.vue | ||
WeekPicker
| Name | Type | Default | Description |
|---|---|---|---|
size | "default" | "lg" | "sm" | undefined | "default" | Controls the date trigger height, padding, and icon dimensions. |
DetailsDeclared typeNonNullable<"default" | "lg" | "sm" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/WeekPicker.vue | |||
variant | "default" | "error" | "success" | undefined | "default" | Controls the date trigger appearance, with default, error, and success colors. |
DetailsDeclared typeNonNullable<"default" | "success" | "error" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/WeekPicker.vue | |||
modelValueNullable | Date | null | undefined | null | The Date representing the selected week, bound with v-model. Calendar or shortcut selection returns local midnight at the week start specified by weekStartsOn. |
DetailsDeclared typeDate | null | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
weekStartsOn | 0 | 1 | undefined | 1 | Sets the week start: 0 for Sunday or 1 for Monday. It controls the first calendar column, week highlight, and start date emitted on selection; it is not inferred from the current locale. |
DetailsDeclared type0 | 1 | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
placeholder | string | undefined | undefinedRuntime fallback: | Placeholder text in the trigger when there is no week to display. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
shortcuts | DatePickerShortcut[] | undefined | []Factory evaluated per instance | Week shortcuts supplied as Dates or functions returning Dates. Selection converts the value to the week start specified by weekStartsOn. |
DetailsDeclared typeDatePickerShortcut[] | undefined Referenced types DatePickerShortcut Type definition — DatePickerShortcutexport interface DatePickerShortcut {
label: string
value: Date | (() => Date)
}Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
open | boolean | undefined | undefinedRuntime fallback: | The controlled panel open state. Use v-model:open to apply open-state requests emitted by the component. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
displayFormat | string | undefined | "YYYY-WW" | Formats the date text shown in the trigger using YYYY, YY, MM, DD, HH, mm, ss, and WW, while keeping the bound value as a Date. WW uses ISO week numbers; when the format contains weeks but no month or day tokens, the year is the ISO week year. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
minDate | Date | undefined | undefined | The earliest selectable date passed to the week calendar. Selection is converted to the week start, which can precede this bound; shortcuts are also converted directly to week starts. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
maxDate | Date | undefined | undefined | The latest selectable date passed to the week calendar. It constrains the selected calendar day rather than requiring the entire week to fit; callers must supply valid shortcut ranges. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
disabled | boolean | undefined | false | Disables the trigger and hides its clear button. Pickers with a hidden form field also disable that field. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
readonly | boolean | undefined | false | Closes the panel, blocks opening, selection, confirmation, and clearing, and preserves the current bound value. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
clearable | boolean | undefined | false | Shows the panel footer with Clear and Confirm actions. The trigger also shows a clear button when it has a value and is neither disabled nor read-only. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
name | string | undefined | undefined | The native hidden form field name, submitting the current Date as YYYY-MM-DD independently of the week display format. Empty values submit an empty string; disabled fields are omitted. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
id | string | undefined | undefined | The HTML ID assigned to the date trigger button for labels or assistive-technology references. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | The accessible name of the week trigger and week panel. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
class | string | undefined | undefined | Additional CSS classes merged into the date trigger button. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: Date | null] | Emitted when a date is selected, confirmed, or cleared, updating v-model. Clearing emits null. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/WeekPicker.vue | ||
@open | [] | Emitted when the panel state becomes open. Its displayed selection is reinitialized from the current modelValue. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/WeekPicker.vue | ||
@close | [] | Emitted when the panel state becomes closed. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/WeekPicker.vue | ||
@update:open | [value: boolean] | Emitted when the component requests an open-state update for v-model:open. During normal interaction, the parent updates open. Enabling readonly or disabled closes the panel immediately and emits a close request. |
DetailsDeclared type[value: boolean] Literal values
Sourcepackages/ui/src/components/date-picker/WeekPicker.vue | ||
@change | [value: Date | null] | Emitted immediately on confirmation or clearing. On other closes, it is emitted only if the panel selection and the current modelValue have different timestamps. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/WeekPicker.vue | ||
| Name | Signature or type | Description |
|---|---|---|
open | boolean | A writable reference to the panel open state. Assigning through the component instance requests opening or closing; readonly blocks opening requests. Controlled writes emit update:open and require the parent to update open. |
DetailsDeclared typeboolean Literal values
Sourcepackages/ui/src/components/date-picker/WeekPicker.vue | ||
WeekPickerPanel
| Name | Type | Default | Description |
|---|---|---|---|
modelValueNullable | Date | null | undefined | null | The date identifying the selected week. Its whole week is highlighted, and selection updates return the week start. |
DetailsDeclared typeDate | null | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/WeekPickerPanel.vue | |||
weekStartsOn | 0 | 1 | undefined | 1 | Sets the week start: 0 for Sunday or 1 for Monday. It controls the first calendar column, week highlight, and start date emitted on selection; it is not inferred from the current locale. |
DetailsDeclared type0 | 1 | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/WeekPickerPanel.vue | |||
minDate | Date | undefined | undefined | The earliest selectable date passed to the week calendar. Selection is converted to the week start, which can precede this bound; shortcuts are also converted directly to week starts. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/WeekPickerPanel.vue | |||
maxDate | Date | undefined | undefined | The latest selectable date passed to the week calendar. It constrains the selected calendar day rather than requiring the entire week to fit; callers must supply valid shortcut ranges. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/WeekPickerPanel.vue | |||
shortcuts | DatePickerShortcut[] | undefined | []Factory evaluated per instance | Labeled date shortcuts in the sidebar. Selection and active-state comparison both use the corresponding week start. |
DetailsDeclared typeDatePickerShortcut[] | undefined Referenced types DatePickerShortcut Type definition — DatePickerShortcutexport interface DatePickerShortcut {
label: string
value: Date | (() => Date)
}Default value details
Sourcepackages/ui/src/components/date-picker/WeekPickerPanel.vue | |||
clearable | boolean | undefined | true | Shows the panel footer containing Clear and Confirm buttons. Turning it off hides both buttons. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/WeekPickerPanel.vue | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | The accessible name of the week panel dialog. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/WeekPickerPanel.vue | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: Date | null] | Emitted on calendar or shortcut selection with local midnight at the week start aligned to weekStartsOn. Clearing emits null. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/WeekPickerPanel.vue | ||
@clear | [] | Emitted when the panel Clear button is clicked, followed by update:modelValue(null). |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/WeekPickerPanel.vue | ||
@confirm | [value: Date | null] | Emitted when the panel Confirm button is clicked, carrying the current modelValue, including null when nothing is selected. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/WeekPickerPanel.vue | ||
YearPicker
| Name | Type | Default | Description |
|---|---|---|---|
size | "default" | "lg" | "sm" | undefined | "default" | Controls the date trigger height, padding, and icon dimensions. |
DetailsDeclared typeNonNullable<"default" | "lg" | "sm" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/YearPicker.vue | |||
variant | "default" | "error" | "success" | undefined | "default" | Controls the date trigger appearance, with default, error, and success colors. |
DetailsDeclared typeNonNullable<"default" | "success" | "error" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/YearPicker.vue | |||
modelValueNullable | Date | null | undefined | null | The selected year represented by a Date and bound with v-model. Year selection preserves the existing month and day or uses today when empty, adjusting a leap day to a valid date. |
DetailsDeclared typeDate | null | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
placeholder | string | undefined | undefinedRuntime fallback: | Placeholder text in the trigger when there is no year to display. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
open | boolean | undefined | undefinedRuntime fallback: | The controlled panel open state. Use v-model:open to apply open-state requests emitted by the component. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
displayFormat | string | undefined | "YYYY" | Formats the date text shown in the trigger using YYYY, YY, MM, DD, HH, mm, ss, and WW, while keeping the bound value as a Date. WW uses ISO week numbers; when the format contains weeks but no month or day tokens, the year is the ISO week year. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
minDate | Date | undefined | undefined | The lower year-selection bound. Earlier years are disabled. A result in the boundary year that precedes this value is clamped to this datetime. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
maxDate | Date | undefined | undefined | The upper year-selection bound. Later years are disabled. A result in the boundary year that follows this value is clamped to this datetime. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
disabled | boolean | undefined | false | Disables the trigger and hides its clear button. Pickers with a hidden form field also disable that field. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
readonly | boolean | undefined | false | Closes the panel, blocks opening, selection, confirmation, and clearing, and preserves the current bound value. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
clearable | boolean | undefined | false | Shows the panel footer with Clear and Confirm actions. The trigger also shows a clear button when it has a value and is neither disabled nor read-only. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
name | string | undefined | undefined | The native hidden form field name, submitting the year as YYYY independently of displayFormat. Empty values submit an empty string; disabled fields are omitted. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
id | string | undefined | undefined | The HTML ID assigned to the date trigger button for labels or assistive-technology references. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | The accessible name of the year trigger and year panel. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
class | string | undefined | undefined | Additional CSS classes merged into the date trigger button. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/types.ts | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: Date | null] | Emitted when a date is selected, confirmed, or cleared, updating v-model. Clearing emits null. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/YearPicker.vue | ||
@open | [] | Emitted when the panel state becomes open. Its displayed selection is reinitialized from the current modelValue. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/YearPicker.vue | ||
@close | [] | Emitted when the panel state becomes closed. |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/YearPicker.vue | ||
@update:open | [value: boolean] | Emitted when the component requests an open-state update for v-model:open. During normal interaction, the parent updates open. Enabling readonly or disabled closes the panel immediately and emits a close request. |
DetailsDeclared type[value: boolean] Literal values
Sourcepackages/ui/src/components/date-picker/YearPicker.vue | ||
@change | [value: Date | null] | Emitted immediately on confirmation or clearing. On other closes, it is emitted only if the panel selection and the current modelValue have different timestamps. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/YearPicker.vue | ||
| Name | Signature or type | Description |
|---|---|---|
open | boolean | A writable reference to the panel open state. Assigning through the component instance requests opening or closing; readonly blocks opening requests. Controlled writes emit update:open and require the parent to update open. |
DetailsDeclared typeboolean Literal values
Sourcepackages/ui/src/components/date-picker/YearPicker.vue | ||
YearPickerPanel
| Name | Type | Default | Description |
|---|---|---|---|
modelValueNullable | Date | null | undefined | null | The Date representing the selected year and initializing the viewed decade. Clearing returns the view to the decade containing the current year. |
DetailsDeclared typeDate | null | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/YearPickerPanel.vue | |||
minDate | Date | undefined | undefined | The lower year-selection bound. Earlier years are disabled. A result in the boundary year that precedes this value is clamped to this datetime. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/YearPickerPanel.vue | |||
maxDate | Date | undefined | undefined | The upper year-selection bound. Later years are disabled. A result in the boundary year that follows this value is clamped to this datetime. |
DetailsDeclared typeDate | undefined Default value details
Sourcepackages/ui/src/components/date-picker/YearPickerPanel.vue | |||
clearable | boolean | undefined | true | Shows the panel footer containing Clear and Confirm buttons. Turning it off hides both buttons. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/date-picker/YearPickerPanel.vue | |||
yearRange | number | undefined | 12Runtime fallback: | The number of consecutive years per page and the step for previous/next navigation. The initial view still starts at the decade boundary of the selected or current year. |
DetailsDeclared typenumber | undefined Default value details
Sourcepackages/ui/src/components/date-picker/YearPickerPanel.vue | |||
ariaLabel | string | undefined | undefinedRuntime fallback: | The accessible name of the year panel dialog. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/date-picker/YearPickerPanel.vue | |||
| Name | Signature or type | Description |
|---|---|---|
@update:modelValue | [value: Date | null] | Emitted when an available year is selected. Uses the existing or current month and day at local midnight, adjusts February 29 to February 28 in a non-leap year, and clamps the result to the bounds. Clearing emits null. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/YearPickerPanel.vue | ||
@clear | [] | Emitted when the panel Clear button is clicked, followed by update:modelValue(null). |
DetailsDeclared type[] Sourcepackages/ui/src/components/date-picker/YearPickerPanel.vue | ||
@confirm | [value: Date | null] | Confirms the existing value in an available year on the current page, clamped to the bounds. Otherwise, it uses the first available year on the page. A page with no available years leaves the current value in place. An empty value emits null. |
DetailsDeclared type[value: Date | null] Literal values
Sourcepackages/ui/src/components/date-picker/YearPickerPanel.vue | ||
Accessibility
Keyboard Navigation
| Key | Action |
|---|---|
Enter / Space | Open the panel |
Escape | Close the panel |
Tab | Switch between the input and the panel |
FAQ
Q: After installation, the component reports an error that the v-calendar module cannot be found?
A: The DatePicker component depends on v-calendar, which is an additional dependency that needs to be installed manually: pnpm add v-calendar. After installation, restart the dev server and it should work normally.
Q: Why doesn't DatePickerRange have an open prop?
A: DatePickerRange and TimePicker do not expose the open reactive ref and do not support controlling the panel state via v-model:open two-way binding. If you need programmatic control of the panel, please use DatePicker, DateTimePicker, WeekPicker, MonthPicker, or YearPicker.
Q: After selecting a date in WeekPicker, why does the displayed week start date not match expectations?
A: The weekStartsOn prop of WeekPicker controls the week start day: 0 means the week starts on Sunday, 1 means the week starts on Monday (default). After selecting any date, modelValue automatically aligns to the start of that week. If the displayed result does not match expectations, please check whether the weekStartsOn setting meets your business requirements.