Skip to content
Theme:

Ui3nDatePicker ​

Inline date picker panel with year and month selectors, a calendar grid, and an optional time picker. Use v-model with a Date | null. When show-timepicker is off, the emitted value is reset to the start of the day; when it is on, the selected time is preserved.

without-year hides the year selector and the weekdays (the calendar renders only the days of the month) and keeps the UI3N_NO_YEAR_REFERENCE year (2000) in the emitted value. allow-without-year renders a switch that emits update:withoutYear and converts the current value. The switch label comes from localeConfig.withoutYear. The mode is ignored together with show-timepicker.

Props

NameTypeDefaultDescription
modelValue*Date | null —

Selected date or null

idstring | undefined —

Root element id

sizeUi3nDateTimePickerSize | undefined"regular"

Component size

localeConfigUi3nDateTimeLocaleConfig | undefined{}

Localized weekday, month and time-unit labels

firstDayOfWeek0 | 1 | undefined1

First day of the week: 0 (Sunday) or 1 (Monday)

showTimepickerboolean | undefined —

Whether to render the time picker below the calendar

timepickerConfigUi3nTimePickerConfig | undefined —

Time picker configuration used when `showTimepicker` is true

highlightWeekendsboolean | undefined —

Whether to highlight Saturdays and Sundays

disabledDaysstring[] | undefined[]

ISO dates to disable (`YYYY-MM-DD`)

disabledboolean | undefined —

Whether the whole picker is disabled

withoutYearboolean | undefinedfalse

"Without year" mode: the year selector is hidden, weekdays are not shown and the emitted date always has the `UI3N_NO_YEAR_REFERENCE` year. Not supported together with `showTimepicker` (ignored in that case).

allowWithoutYearboolean | undefinedfalse

Whether to render the "without year" switch that toggles `withoutYear` (emits `update:withoutYear`).

Events

Event NameArguments / Value TypeDescription
update:modelValuevalue: Date | null —
update:withoutYearvalue: boolean —

CSS Variables

Set any of these where you need it — on :root, on a container, or on the element itself through [data-ui3n] — and the component follows. Leave them alone and it uses the defaults below.

NameDefault
--ui3n-date-picker-background-colorvar(--color-bg-block-primary-default)
--ui3n-date-picker-border-radius12px

Usage Examples ​

Basic usage ​

Binds a Date | null value and renders the year/month selectors and calendar inline.

Basic usage

Date picker bound to a Date value

Date and time ​

Enables the time picker below the calendar and configures it to show seconds. The selected time is preserved when a new date is chosen.

Date and time

Date picker with an optional seconds-precision time picker

Localization ​

Overrides weekday, month and time-unit labels, and starts the week on Monday.

Localization

Russian labels with Monday as the first day of the week

Disabled days and weekends ​

Marks selected ISO dates as unavailable, highlights weekends, and starts the week on Sunday. Disabled days cannot be selected.

Disabled days and weekends

Disabled dates with weekend highlighting and Sunday-first week

Sizes and disabled state ​

Shows the regular and large sizes together with a fully disabled picker.

Sizes and disabled state

Regular, large and disabled date pickers

Without year ​

The switch at the top toggles the year-less mode; the calendar then shows only the days of the selected month.

Without year

Date picker with the without-year switch