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

Anatomie

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

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

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

Événements émis par ce composant.

@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

Membres exposés

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

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

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.

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

Inclusion

Accessibilité

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

Interactions clavier

Interactions clavier
ToucheAction
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.

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.

Navigation controls bar

vue

Écosystème

Famille

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