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
| Name | Type | Default | Description |
|---|---|---|---|
modelValue* | Date | null | — | Selected date or null |
id | string | undefined | — | Root element id |
size | Ui3nDateTimePickerSize | undefined | "regular" | Component size |
localeConfig | Ui3nDateTimeLocaleConfig | undefined | {} | Localized weekday, month and time-unit labels |
firstDayOfWeek | 0 | 1 | undefined | 1 | First day of the week: 0 (Sunday) or 1 (Monday) |
showTimepicker | boolean | undefined | — | Whether to render the time picker below the calendar |
timepickerConfig | Ui3nTimePickerConfig | undefined | — | Time picker configuration used when `showTimepicker` is true |
highlightWeekends | boolean | undefined | — | Whether to highlight Saturdays and Sundays |
disabledDays | string[] | undefined | [] | ISO dates to disable (`YYYY-MM-DD`) |
disabled | boolean | undefined | — | Whether the whole picker is disabled |
withoutYear | boolean | undefined | false | "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). |
allowWithoutYear | boolean | undefined | false | Whether to render the "without year" switch that toggles `withoutYear` (emits `update:withoutYear`). |
Events
| Event Name | Arguments / Value Type | Description |
|---|---|---|
update:modelValue | value: Date | null | — |
update:withoutYear | value: 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.
| Name | Default |
|---|---|
--ui3n-date-picker-background-color | var(--color-bg-block-primary-default) |
--ui3n-date-picker-border-radius | 12px |
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