DatePickerControls

Form & Input
stable

Navigation toolbar for the DatePicker. Renders a month/year label button, a mode-toggle icon button, and prev/next navigation buttons. Emits discrete click events for each control.

Structure

Anatomy

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

Anatomy of OrigamDatePickerControlsA flex row with a button group on the left and navigation buttons on the right. 1 2 3
Anatomy of <origam-date-picker-controls> — root flex row ①, left button group (month label + mode toggle) ②, right navigation button group (prev + next) ③.
1.origam-date-picker-controls
Root flex container.
2.origam-date-picker-controls__month-btn / .origam-date-picker-controls__mode-btn
Left button group: month label button and mode-toggle icon button.
3.origam-date-picker-controls__month
Right flex container holding the prev/next navigation button group.

API

Props

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

active
string | Array<string> | boolean | IActiveState
Active state passed to child button groups.
disabled
boolean
false
Disables all controls simultaneously.
disabledMonth
boolean
false
Disables the month label button only.
disabledYear
boolean
false
Disables the mode-toggle (year) button only.
disabledNext
boolean
false
Disables the next navigation button only.
disabledPrev
boolean
false
Disables the previous navigation button only.
nextIcon
'mdi-chevron-right'
Icon for the "next" navigation button.
prevIcon
'mdi-chevron-left'
Icon for the "previous" navigation button.
modeIcon
'mdi-menu-down-outline'
Icon for the view-mode toggle button (next to the month label).
text
string
Label displayed on the month button (e.g. "June 2024").
viewMode
'month'
Current view mode — controls which panel (month/year) is active.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue

API

Emits

Events emitted by this component.

@click:year
MouseEvent
Fired when the mode-toggle button is clicked to switch to year view.
@click:month
MouseEvent
Fired when the month label button is clicked.
@click:prev
MouseEvent
Fired when the previous navigation button is clicked.
@click:next
MouseEvent
Fired when the next navigation button is clicked.
@click:text
MouseEvent
Fired when the text label area is clicked.

API

Exposed members

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

(props: IDatePickerControlsProps, exclude?: string[]) => Partial<IDatePickerControlsProps>
Filters component props for forwarding.
ComputedRef<string>
Serialised scoped CSS string.
string
Unique style scope identifier.
() => void
Mounts the scoped style sheet.
() => void
Unmounts the scoped style sheet.
Ref<boolean>
Whether the scoped style sheet is currently mounted.

Customisation

CSS variables

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

Default text colour of the controls.
Text colour on hover.
Text colour when disabled.

Inclusion

Accessibility

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

Keyboard interactions

Keyboard interactions
KeyAction
TabMoves focus between the five control buttons.
Enter / SpaceActivates the focused button.

Notes

  • Disabled controls receive tabindex="-1" via OrigamBtn and are not reachable by keyboard.

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.

Navigation controls bar

vue

Ecosystem

Family

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