An official website of the United States government
Official websites use .gov A .gov website belongs to an official government organization in the United States.
Secure .gov websites use HTTPS A lock or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.
An official website of the United States government
Official websites use .gov A .gov website belongs to an official government organization in the United States.
Secure .gov websites use HTTPS A lock or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.
The Month Picker 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.
Loading
Code
React
See Storybook for React guidance of this component.
Styles
The following CSS variables can be overridden to customize MonthPicker fields:
CSS variables for choice
Variable
Default Core Theme Value
--choice__background-color
--color-white
--choice__background-color--checked
--color-primary
--choice__background-color--disabled
--color-border
--choice__background-color--inverse
--color-transparent
--choice__background-color--disabled--inverse
#e9ecf126
--choice__border-color
--color-base
--choice__border-color--checked
--color-primary
--choice__border-color--disabled
--color-gray-light
--choice__border-color--error
--color-base
--choice__border-color--error--inverse
--color-white
--choice__border-color--inverse
--color-white
--choice__border-color--left
--color-primary
--choice__border-color--focus
--color-primary-darker
--choice__border-color--disabled--inverse
--color-gray-light
--choice__border-radius
0px
--choice__border-width
2px
--choice__color--unchecked
--color-white
--choice__color--disabled
--color-gray-dark
--choice__size
32px
--choice__size--small
20px
--choice__size-radio
22px
--choice__size-radio--small
12px
--choice-label__color--disabled
--color-gray-dark
--choice-label__color--disabled--inverse
--color-muted-inverse
Form components
This component also makes use of form field styles, which can be customized by the following variables: