DatePickerControls
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.
<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.
- activestring | Array<string> | boolean | IActiveState
- Active state passed to child button groups.
- disabledbooleanfalse
- Disables all controls simultaneously.
- disabledMonthbooleanfalse
- Disables the month label button only.
- disabledYearbooleanfalse
- Disables the mode-toggle (year) button only.
- disabledNextbooleanfalse
- Disables the next navigation button only.
- disabledPrevbooleanfalse
- Disables the previous navigation button only.
- Icon for the "next" navigation button.
- Icon for the "previous" navigation button.
- Icon for the view-mode toggle button (next to the month label).
- textstring
- Label displayed on the month button (e.g. "June 2024").
- Current view mode — controls which panel (month/year) is active.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
API
Emits
Events emitted by this component.
- @click:yearMouseEvent
- Fired when the mode-toggle button is clicked to switch to year view.
- @click:monthMouseEvent
- Fired when the month label button is clicked.
- @click:prevMouseEvent
- Fired when the previous navigation button is clicked.
- @click:nextMouseEvent
- Fired when the next navigation button is clicked.
- @click:textMouseEvent
- 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
| Key | Action |
|---|---|
| Tab | Moves focus between the five control buttons. |
| Enter / Space | Activates 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
Ecosystem
Family
Components from the same folder that share conventions and often compose together.