Skip to content

Month Picker

Free

Pick a month, not a day, from a page of 12 months. It can also pick a range of months, with limits and closed months.

  • Base UI
  • React Aria
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Put the header and the grid in the picker. The grid gives a function that returns one cell for each month.

invoice-month.tsx

MonthPicker

<fieldset>
PropTypeDefaultDescription
autoFocusboolean—Moves the focus to the selected month (or the first month) on mount.
disabledboolean—Turns off the control: no focus, no edits, and the disabled look.
readOnlyboolean—The user can focus and read the value, but cannot change it.
invalidboolean—Shows the invalid look and sets aria-invalid.
labels—The words (MONTH_PICKER_LABELS). Keep the object stable.
minValueDateValue | null—The earliest month that can be picked: months that end before it are disabled.
maxValueDateValue | null—The latest month that can be picked: months that start after it are disabled.
isMonthUnavailable—Months that can take the focus but not the value (no data, closed): struck through. Gets day 1 of the month in the calendar of the value (Gregorian when there is none).
focusedValueDateValue—A date in the year that the page shows (controlled).
defaultFocusedValueDateValue—A date in the year that the page shows first. Default: the value, else today. With server rendering and no value, pass it from the request: the server clock can be in another year.
onFocusChange—Called with day 1 of the new year (in the calendar of the locale) when the page turns.
selectionMode"range""single"—single (default): one month. range: a start and an end month, with the band.
value—Day 1 of the selected month (controlled). Day 1 of the first and of the last month (controlled).
defaultValue—
onValueChange—Called on every pick, also a press on the month that is the value already. Called when the user picks the end month, also when the range is the same.
...props<fieldset> attributes—Every other attribute goes to the <fieldset>, with a ref.

MonthPickerHeader

<header>
PropTypeDefaultDescription
...props<header> attributes—Every other attribute goes to the <header>, with a ref.

MonthPickerGrid

PropTypeDefaultDescription
aria-labelstring—Defines a string value that labels the current element.
aria-labelledbystring—Identifies the element (or elements) that labels the current element.
aria-describedbystring—Identifies the element (or elements) that describes the object.
aria-detailsstring—Identifies the element (or elements) that provide a detailed, extended description for the object.
idstring—The element's unique identifier. See MDN.
dirstring—
langstring—
hiddenboolean—
inertboolean—
translate"no""yes"—
suppressHydrationWarningboolean—A React-only flag that suppresses the warning React normally logs when an element's server-rendered content doesn't match the client render during hydration. See React docs.
onClickMouseEventHandler<HTMLDivElement>—
onClickCaptureMouseEventHandler<HTMLDivElement>—
onAuxClickMouseEventHandler<HTMLDivElement>—
onAuxClickCaptureMouseEventHandler<HTMLDivElement>—
onContextMenuMouseEventHandler<HTMLDivElement>—
onContextMenuCaptureMouseEventHandler<HTMLDivElement>—
onDoubleClickMouseEventHandler<HTMLDivElement>—
onDoubleClickCaptureMouseEventHandler<HTMLDivElement>—
onMouseDownMouseEventHandler<HTMLDivElement>—
onMouseDownCaptureMouseEventHandler<HTMLDivElement>—
onMouseEnterMouseEventHandler<HTMLDivElement>—
onMouseLeaveMouseEventHandler<HTMLDivElement>—
onMouseMoveMouseEventHandler<HTMLDivElement>—
onMouseMoveCaptureMouseEventHandler<HTMLDivElement>—
onMouseOutMouseEventHandler<HTMLDivElement>—
onMouseOutCaptureMouseEventHandler<HTMLDivElement>—
onMouseOverMouseEventHandler<HTMLDivElement>—
onMouseOverCaptureMouseEventHandler<HTMLDivElement>—
onMouseUpMouseEventHandler<HTMLDivElement>—
onMouseUpCaptureMouseEventHandler<HTMLDivElement>—
onTouchCancelTouchEventHandler<HTMLDivElement>—
onTouchCancelCaptureTouchEventHandler<HTMLDivElement>—
onTouchEndTouchEventHandler<HTMLDivElement>—
onTouchEndCaptureTouchEventHandler<HTMLDivElement>—
onTouchMoveTouchEventHandler<HTMLDivElement>—
onTouchMoveCaptureTouchEventHandler<HTMLDivElement>—
onTouchStartTouchEventHandler<HTMLDivElement>—
onTouchStartCaptureTouchEventHandler<HTMLDivElement>—
onPointerDownPointerEventHandler<HTMLDivElement>—
onPointerDownCapturePointerEventHandler<HTMLDivElement>—
onPointerMovePointerEventHandler<HTMLDivElement>—
onPointerMoveCapturePointerEventHandler<HTMLDivElement>—
onPointerUpPointerEventHandler<HTMLDivElement>—
onPointerUpCapturePointerEventHandler<HTMLDivElement>—
onPointerCancelPointerEventHandler<HTMLDivElement>—
onPointerCancelCapturePointerEventHandler<HTMLDivElement>—
onPointerEnterPointerEventHandler<HTMLDivElement>—
onPointerLeavePointerEventHandler<HTMLDivElement>—
onPointerOverPointerEventHandler<HTMLDivElement>—
onPointerOverCapturePointerEventHandler<HTMLDivElement>—
onPointerOutPointerEventHandler<HTMLDivElement>—
onPointerOutCapturePointerEventHandler<HTMLDivElement>—
onGotPointerCapturePointerEventHandler<HTMLDivElement>—
onGotPointerCaptureCapturePointerEventHandler<HTMLDivElement>—
onLostPointerCapturePointerEventHandler<HTMLDivElement>—
onLostPointerCaptureCapturePointerEventHandler<HTMLDivElement>—
onScrollUIEventHandler<HTMLDivElement>—
onScrollCaptureUIEventHandler<HTMLDivElement>—
onWheelWheelEventHandler<HTMLDivElement>—
onWheelCaptureWheelEventHandler<HTMLDivElement>—
onAnimationStartAnimationEventHandler<HTMLDivElement>—
onAnimationStartCaptureAnimationEventHandler<HTMLDivElement>—
onAnimationEndAnimationEventHandler<HTMLDivElement>—
onAnimationEndCaptureAnimationEventHandler<HTMLDivElement>—
onAnimationIterationAnimationEventHandler<HTMLDivElement>—
onAnimationIterationCaptureAnimationEventHandler<HTMLDivElement>—
onTransitionCancelTransitionEventHandler<HTMLDivElement>—
onTransitionCancelCaptureTransitionEventHandler<HTMLDivElement>—
onTransitionEndTransitionEventHandler<HTMLDivElement>—
onTransitionEndCaptureTransitionEventHandler<HTMLDivElement>—
onTransitionRunTransitionEventHandler<HTMLDivElement>—
onTransitionRunCaptureTransitionEventHandler<HTMLDivElement>—
onTransitionStartTransitionEventHandler<HTMLDivElement>—
onTransitionStartCaptureTransitionEventHandler<HTMLDivElement>—
onFocus—Handler that is called when the element receives focus.
onBlur—Handler that is called when the element loses focus.
onFocusChange—Handler that is called when the element's focus status changes.
styleStyleOrFunction<ListBoxRenderProps>—The inline style for the element. A function may be provided to compute the style based on component state.
slotstring | null—A slot name for the component. Slots allow the component to receive props from a parent component. An explicit null value indicates that the local props completely override all props received from a parent.
render—Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements: - You must render the expected element type (e.g. if <button> is expected, you cannot render an <a>). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.
autoFocus"first""last"boolean—Whether to auto focus the listbox or an option.
shouldFocusWrapboolean—Whether focus should wrap around when the end/start is reached.
shouldSelectOnPressUpboolean—Whether selection should occur on press up instead of press down.
shouldFocusOnHoverboolean—Whether options should be focused when the user hovers over them.
onAction—Handler that is called when a user performs an action on an item. The exact user event depends on the collection's selectionBehavior prop and the interaction modality.
dependenciesreadonly any[]—Values that should invalidate the item cache when using dynamic collections.
dragAndDropHooksDragAndDropHooks<object>—The drag and drop hooks returned by useDragAndDrop used to enable drag and drop behavior for the ListBox.
renderEmptyState—Provides content to display when there are no items in the list.
orientation"horizontal""vertical"'vertical'The primary orientation of the items. Usually this is the direction that the collection scrolls.
classNamestring—
refRef<HTMLDivElement>—The grid element. The component also uses it for the page motion.
children—A function from day 1 of a month (in the calendar of the locale) to a MonthPickerCell, for a labelSuffix or other content. Default: <MonthPickerCell date={date} />.

MonthPickerCell

PropTypeDefaultDescription
hrefstring—A URL to link to. See MDN.
hrefLangstring—Hints at the human language of the linked URL. SeeMDN.
target"_blank""_parent""_self""_top"string—The target window for the link. See MDN.
relstring—The relationship between the linked resource and the current page. See MDN.
downloadstring | boolean—Causes the browser to download the linked URL. A string may be provided to suggest a file name. See MDN.
pingstring—A space-separated list of URLs to ping when the link is followed. See MDN.
referrerPolicy"""no-referrer""no-referrer-when-downgrade""origin""origin-when-cross-origin""same-origin""strict-origin""strict-origin-when-cross-origin""unsafe-url"—How much of the referrer to send when following the link. See MDN.
routerOptions—Options for the configured client side router.
dirstring—
langstring—
hiddenboolean—
inertboolean—
translate"no""yes"—
suppressHydrationWarningboolean—A React-only flag that suppresses the warning React normally logs when an element's server-rendered content doesn't match the client render during hydration. See React docs.
onClickCaptureMouseEventHandler<HTMLDivElement>—
onAuxClickMouseEventHandler<HTMLDivElement>—
onAuxClickCaptureMouseEventHandler<HTMLDivElement>—
onContextMenuMouseEventHandler<HTMLDivElement>—
onContextMenuCaptureMouseEventHandler<HTMLDivElement>—
onDoubleClickMouseEventHandler<HTMLDivElement>—
onDoubleClickCaptureMouseEventHandler<HTMLDivElement>—
onMouseDownMouseEventHandler<HTMLDivElement>—
onMouseDownCaptureMouseEventHandler<HTMLDivElement>—
onMouseEnterMouseEventHandler<HTMLDivElement>—
onMouseLeaveMouseEventHandler<HTMLDivElement>—
onMouseMoveMouseEventHandler<HTMLDivElement>—
onMouseMoveCaptureMouseEventHandler<HTMLDivElement>—
onMouseOutMouseEventHandler<HTMLDivElement>—
onMouseOutCaptureMouseEventHandler<HTMLDivElement>—
onMouseOverMouseEventHandler<HTMLDivElement>—
onMouseOverCaptureMouseEventHandler<HTMLDivElement>—
onMouseUpMouseEventHandler<HTMLDivElement>—
onMouseUpCaptureMouseEventHandler<HTMLDivElement>—
onTouchCancelTouchEventHandler<HTMLDivElement>—
onTouchCancelCaptureTouchEventHandler<HTMLDivElement>—
onTouchEndTouchEventHandler<HTMLDivElement>—
onTouchEndCaptureTouchEventHandler<HTMLDivElement>—
onTouchMoveTouchEventHandler<HTMLDivElement>—
onTouchMoveCaptureTouchEventHandler<HTMLDivElement>—
onTouchStartTouchEventHandler<HTMLDivElement>—
onTouchStartCaptureTouchEventHandler<HTMLDivElement>—
onPointerDownPointerEventHandler<HTMLDivElement>—
onPointerDownCapturePointerEventHandler<HTMLDivElement>—
onPointerMovePointerEventHandler<HTMLDivElement>—
onPointerMoveCapturePointerEventHandler<HTMLDivElement>—
onPointerUpPointerEventHandler<HTMLDivElement>—
onPointerUpCapturePointerEventHandler<HTMLDivElement>—
onPointerCancelPointerEventHandler<HTMLDivElement>—
onPointerCancelCapturePointerEventHandler<HTMLDivElement>—
onPointerEnterPointerEventHandler<HTMLDivElement>—
onPointerLeavePointerEventHandler<HTMLDivElement>—
onPointerOverPointerEventHandler<HTMLDivElement>—
onPointerOverCapturePointerEventHandler<HTMLDivElement>—
onPointerOutPointerEventHandler<HTMLDivElement>—
onPointerOutCapturePointerEventHandler<HTMLDivElement>—
onGotPointerCapturePointerEventHandler<HTMLDivElement>—
onGotPointerCaptureCapturePointerEventHandler<HTMLDivElement>—
onLostPointerCapturePointerEventHandler<HTMLDivElement>—
onLostPointerCaptureCapturePointerEventHandler<HTMLDivElement>—
onScrollUIEventHandler<HTMLDivElement>—
onScrollCaptureUIEventHandler<HTMLDivElement>—
onWheelWheelEventHandler<HTMLDivElement>—
onWheelCaptureWheelEventHandler<HTMLDivElement>—
onAnimationStartAnimationEventHandler<HTMLDivElement>—
onAnimationStartCaptureAnimationEventHandler<HTMLDivElement>—
onAnimationEndAnimationEventHandler<HTMLDivElement>—
onAnimationEndCaptureAnimationEventHandler<HTMLDivElement>—
onAnimationIterationAnimationEventHandler<HTMLDivElement>—
onAnimationIterationCaptureAnimationEventHandler<HTMLDivElement>—
onTransitionCancelTransitionEventHandler<HTMLDivElement>—
onTransitionCancelCaptureTransitionEventHandler<HTMLDivElement>—
onTransitionEndTransitionEventHandler<HTMLDivElement>—
onTransitionEndCaptureTransitionEventHandler<HTMLDivElement>—
onTransitionRunTransitionEventHandler<HTMLDivElement>—
onTransitionRunCaptureTransitionEventHandler<HTMLDivElement>—
onTransitionStartTransitionEventHandler<HTMLDivElement>—
onTransitionStartCaptureTransitionEventHandler<HTMLDivElement>—
onKeyDown—Handler that is called when a key is pressed.
onKeyUp—Handler that is called when a key is released.
onFocus—Handler that is called when the element receives focus.
onBlur—Handler that is called when the element loses focus.
onFocusChange—Handler that is called when the element's focus status changes.
onHoverStart—Handler that is called when a hover interaction starts.
onHoverEnd—Handler that is called when a hover interaction ends.
onHoverChange—Handler that is called when the hover state changes.
onPress—Handler that is called when the press is released over the target.
onPressStart—Handler that is called when a press interaction starts.
onPressEnd—Handler that is called when a press interaction ends, either over the target or when the pointer leaves the target.
onPressChange—Handler that is called when the press state changes.
onPressUp—Handler that is called when a press is released over the target, regardless of whether it started on the target or not.
onClick—**Not recommended – use onPress instead.** onClick is an alias for onPress provided for compatibility with other libraries. onPress provides additional event details for non-mouse interactions.
styleStyleOrFunction<ListBoxItemRenderProps>—The inline style for the element. A function may be provided to compute the style based on component state.
render—Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Note: You can check if 'href' in props in order to tell whether to render an <a> element. Requirements: - You must render the expected element type (e.g. if <a> is expected, you cannot render a <button>). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.
aria-labelstring—An accessibility label for this item.
onAction—Handler that is called when a user performs an action on the item. The exact user event depends on the collection's selectionBehavior prop and the interaction modality.
disabledboolean—Turns off the control: no focus, no edits, and the disabled look.
dateRequiredCalendarDate—Day 1 of the month, in the calendar of the locale (from the MonthPickerGrid function).
classNamestring—
labelSuffixstring—Words that the cell name adds after the month: "no usage data", "closed".
childrenReactNode—Replaces the short month name. The current-month dot stays after it.
  • Use it when the day does not matter, such as a billing period.
  • Use selectionMode="range" for a start month and an end month.
  • Use minValue, maxValue, and isMonthUnavailable to block months.
Arrow keysMove one month, or one row. Past an edge the year changes.
HomeorEndGo to the first or the last month.
Page UporPage DownGo one year back or on.
EnterPicks the focused month.

Built with

Installs with Month Picker

Components
Button
  1. AddedMonth Picker, with Button.
Open the release