<MonthPicker>
The MonthPicker component renders a grid of checkboxes with shortened month names as well as buttons for selecting or deselecting all. For internationalization one can pass a locale prop, and the month names will change to match the language of the locale. Full month names are also included as aria-label attributes.
Code snippet
Props
| Name | Type | Default | Description |
|---|---|---|---|
namerequired | string | The | |
locale | string | ||
className | string | Additional classes to be added to the root element. | |
buttonVariation | ButtonVariation | Variation string to be applied to buttons. See Button component | |
disabledMonths | number[] | Array of month numbers, where | |
selectedMonths | number[] | Array of month numbers, where | |
defaultSelectedMonths | number[] | Array of month numbers, where | |
onChange | (event: React.ChangeEvent<HTMLInputElement>) => any | A callback function that's invoked when a month's checked state is changed.
Note: This callback is not called when a month is selected or deselected
via the "Select all" or "Clear all" buttons – use the | |
onSelectAll | () => any | ||
onClearAll | () => any | ||
selectAllText | string | The text for the "Select all" button for internationalization | |
clearAllText | string | The text for the "Clear all" button for internationalization |