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
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<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.
- 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
Événements émis par ce composant.
- @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
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
| Touche | 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.
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
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.