DatePicker

Form & Input
stable

Calendar popup to select a single date, multiple dates or a range. Supports month and year navigation with animated view transitions.

Preview

Rendering the live preview…

default

Rendering the live preview…

range

Rendering the live preview…

no header

Rendering the live preview…

landscape

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamDatePickerSchematic of the DatePicker component with numbered internal regions. 1 2 15 juin 2026 3 < Juin 2026 > 4 Lu Ma Me Je Ve Sa Di 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 5 Cancel OK
Anatomy of <origam-date-picker> — 5 regions: root ①, header strip ②, navigation controls ③, day grid ④, and optional actions ⑤.
1.origam-date-picker
Root element. Fixed width 328px (368px with showWeek). Built on OrigamPicker with overflow:hidden. Modifier --year / --months applied while switching view.
2OrigamDatePickerHeader
Coloured header strip (background from header.background-color token = color.action.primary.bg). Shows the selected date. Hidden via hideHeader prop. Replaced by the #header slot.
3OrigamDatePickerControls
Navigation bar with prev/next arrow buttons and a text button that toggles between month, months and year views.
4OrigamDatePickerMonth
Day-grid view. Weekday labels row + 6 rows of day buttons. Day cells use day.size (40px) and day.border-radius (full). Animated via OrigamFade when switching views.
5#actions slot
Optional action buttons row. Use for Cancel / OK confirmation pattern. Only rendered when the #actions slot is provided.

API

Props

All props accepted by this component, with their type, default value and description.

modelValue
string | Date | Array<string | Date>
Selected date(s). Single value for single mode; array for multiple or range mode.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
color
Intent or custom colour used for the selected day/month/year and the header background.
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border around the picker surface.
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
Border-radius of the picker surface.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
elevation
TElevation
Box-shadow elevation of the picker surface.
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
landscape
boolean
false
Displays the header on the left side and the calendar on the right (landscape orientation).
hideHeader
boolean
false
Hides the coloured header strip showing the selected date.
side
TDirectionBoth
swipeable
boolean
snapPoints
ReadonlyArray<TSheetSnapPoint>
defaultSnap
TSheetSnapId
open
boolean
disabled
boolean
persistent
boolean
handleLabel
string
tag
string
bgColor
TColor
height
number | string
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
location
TAnchor
position
TPosition
top
number | string
bottom
number | string
left
number | string
right
number | string
active
boolean | IStateEffectConfig
activeClass
string
hover
boolean | IStateEffectConfig
hoverClass
string
title
string
Override text shown in the picker header.
fontSize
TFontSize
fontWeight
TFontWeight
letterSpacing
TLetterSpacing
text
string
disabledMonth
boolean
disabledYear
boolean
disabledNext
boolean
disabledPrev
boolean
nextIcon
TIcon
prevIcon
TIcon
modeIcon
TIcon
viewMode
'month'
Current calendar view. 'month' shows day grid; 'months' shows month grid; 'year' shows year list.
hideWeekdays
boolean
false
Hides the weekday labels (Mon, Tue…) above the day grid.
multiple
boolean | number | TAnyString
false
Enables multi-date selection. Pass a number to limit how many dates can be selected.
range
boolean
false
Enables date-range selection mode (start date + end date). modelValue should be an array of two dates.
showWeek
boolean
false
Shows week numbers in the first column of the day grid.
transition
TTransitionProps
reverseTransition
TTransitionProps
allowedDates
Array<unknown> | ((date: unknown) => boolean)
displayValue
unknown
date
ReadonlyArray<unknown> | Array<unknown>
month
number
max
unknown
Maximum selectable date. Dates after this value are disabled.
min
unknown
Minimum selectable date. Dates before this value are disabled.
showAdjacentMonths
boolean
year
number
weekdays
Array<number>
weeksInMonth
TCalendarStrategy
firstDayOfWeek
number
header
string
appendAvatar
string
appendIcon
TIcon
prependAvatar
string
prependIcon
TIcon
prependAriaLabel
string
appendAriaLabel
string
density
TDensity

API

Slots

Content slots exposed by this component.

#title
Custom title rendered inside the picker header strip.
#header
Full override of the header area. Replaces OrigamDatePickerHeader. Receives header text and click handler as slot props.
#default
Full override of the calendar body (controls + day/month/year grid). Use for deeply customised pickers.
#actions
Action buttons rendered below the calendar. Common use: "Cancel" and "OK" buttons to confirm the selection.

API

Emits

Events emitted by this component.

@update:month
number
Fired when the displayed month changes via navigation.
@update:year
number
Fired when the displayed year changes via navigation.
@update:viewMode
TDateMode
Fired when the view changes (month → months → year → month).
@update:modelValue
any
Fired when the selected date(s) change.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props.
Ref<string>
Reactive CSS string for the injected style sheet.
string
Unique style-sheet ID for this instance.
() => void
Injects the style sheet into the document.
() => void
Removes the style sheet from the document.
Ref<boolean>
True once the style sheet has been injected.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Picker surface background colour.
Picker surface foreground colour.
Picker surface border-radius.
Header strip background (selected-date display area).
Header strip text colour.
Size (width and height) of day buttons in the day grid.
Border-radius of day buttons (full circle by default).
Background of the selected day button.
Background of days within a selected date range.
Text colour of days outside the current month.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

ARIA roles

dialog
grid
gridcell
button

Keyboard interactions

Keyboard interactions
KeyAction
← / → / ↑ / ↓Navigate between day cells within the grid.
Enter / SpaceSelect the focused day, month or year.
PageUp / PageDownMove to the previous / next month without leaving the day grid.
Home / EndJump to the first / last day of the current week row.
EscapeClose the picker (when used inside DatePickerField).

Notes

  • The day grid uses role="grid" with role="gridcell" for each day. Disabled days have aria-disabled="true" and are skipped in keyboard navigation.
  • Each day button has an aria-label with the full date string (e.g. "15 juin 2026") for screen reader users.
  • View-change transitions (OrigamFade) are disabled under prefers-reduced-motion: reduce.

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

Source
dimension
40px
Day button size (width and height).
color
var(--origam-color__action--primary---bg)
Selected day button background.
color
var(--origam-color__surface---overlay)
Days in range background (range mode).

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Single date

vue

Date range

vue

With actions

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.