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.

Aperçu

Rendu de l’aperçu en cours…

default

Rendu de l’aperçu en cours…

range

Rendu de l’aperçu en cours…

no header

Rendu de l’aperçu en cours…

landscape

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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

Emplacements de contenu exposés par ce composant.

#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

Événements émis par ce composant.

@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

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<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.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

dialog
grid
gridcell
button

Interactions clavier

Interactions clavier
ToucheAction
← / → / ↑ / ↓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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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).

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Single date

vue

Date range

vue

With actions

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.