QuarterPicker
Inline quarter, multiple quarters and quarters range picker
Source
Package
Usage
QuarterPicker works the same way as MonthPicker, but with quarters instead of months.
The value is a date string in YYYY-MM-DD format that points to the first day of the selected quarter, for example 2026-04-01 for Q2 2026.
Use getQuarterStart exported from @mantine/dates to get the first day of the quarter for any date:
Allow deselect
Set allowDeselect to allow users to deselect the selected quarter by clicking on it, onChange is called with null.
allowDeselect is ignored when the type prop is range or multiple:
Multiple quarters
Set type="multiple" to allow users to pick multiple quarters:
Quarters range
Set type="range" to allow users to pick a quarters range. The value is a tuple of the first day of
the first quarter and the first day of the last quarter:
Single quarter in range
By default, clicking the same quarter twice deselects it, a single quarter cannot be selected as a range.
Set allowSingleDateInRange to allow it:
Presets
Use the presets prop to add custom quarter presets. Presets are displayed next to the calendar.
Any date inside the quarter can be used as a preset value.
To use the dayjs quarter unit with TypeScript, extend dayjs with the quarterOfYear plugin as shown in the demo:
To use presets with type="range", define the value as a tuple of two dates:
Default date
Use the defaultDate prop to set the year that is displayed initially.
defaultDate is ignored when the date prop is set:
Controlling with useCalendar
QuarterPicker component supports the controller pattern. Use the useCalendar hook to manage the displayed date and level.
The controller does not own the selected value, keep using value and onChange for it.
When the controller prop is set, the date and level props of the component are ignored, pass them to useCalendar instead:
Min and max date
Set the minDate and maxDate props to define minimum and maximum dates.
Quarters that end before minDate or start after maxDate are disabled:
Add props to year and quarter control
Use getYearControlProps and getQuarterControlProps to add props to year and quarter controls, for example to disable a control or add styles:
Number of columns
Set the numberOfColumns prop to define the number of pickers that will be rendered side by side:
Demo is not available on small screens. Make your screen larger to see the demo.
Max level
To disallow users from going to the decade level, set maxLevel="year":
Full width
Set the fullWidth prop to make the quarter picker stretch to fill 100% of its parent container width:
Size
Change year and quarter controls format
Use the yearsListFormat and quartersListFormat props to change the dayjs format of year/quarter controls:
Change label format
Use decadeLabelFormat and yearLabelFormat to change the dayjs format of the decade/year label:
Localization
Usually it is better to specify the @mantine/dates package locale in DatesProvider,
but you can also override the locale per component:
Native level select
Set the withNativeLevelSelect prop to replace the calendar header level button with a native <select> element:
Accessibility
Aria labels
Set the ariaLabels prop to specify aria-label attributes for next/previous controls:
Year/quarter control aria-label
Use getYearControlProps/getQuarterControlProps to customize the aria-label attribute:
Keyboard interactions
The following events trigger only when focus is on a quarter control.
When presets are used, only one preset button is in the tab order.
ArrowDown and ArrowUp move focus between presets, Enter or Space selects the focused preset and Tab moves focus to the calendar.