/mantine:mantine-calendarfrom mantine
Builds custom calendars and date pickers with @mantine/dates: per-day content, custom selection rules, unavailable days with reasons, display-only calendars, and non-standard periods (stays, fiscal quarters, fixed-length ranges).
Ships in mantine. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Written for Mantine 10.x. Upgrading code written for 9.x: see Coming from 9.x.
@mantine/dates has two layers. Pickers (DatePicker, WeekPicker, MonthPicker,
QuarterPicker, YearPicker and their *Input versions) own a selected value. Calendar
renders the same grid, header and levels with no selection at all: clicking a day does nothing
until you say what it does. Everything custom is built from three levers on either layer:
getDayProps, getMonthControlProps, getYearControlProps return props for
one cell (state flags, handlers, style, className, data-*, aria-*);renderDay (and functions passed to the *Format props) replace the label;date/onDateChange, level/minLevel/maxLevel or a useCalendar
controller decide which month, year or decade is on screen.Load the mantine-ui skill with this one: it decides which ready input fits a form field
(MaskedDateInput for typed dates, DatePickerInput type="range" numberOfColumns={2} for
periods). This skill covers what those inputs do not do out of the box.
Start from the highest row that fits and decorate it; go lower only when the selection model itself differs.
| Need | Use |
|---|---|
| A date, several dates or a range, inline | DatePicker with type="default" | "multiple" | "range" |
| The same in an input with a dropdown | DatePickerInput (controller: useDatePickerInput) |
| Whole weeks, months, calendar-year quarters or years | WeekPicker, MonthPicker, QuarterPicker, YearPicker and their *Input versions |
| Fiscal quarters in a compact dropdown | Grouped Select with FY2027 Q1 labels, month spans and unavailable/in-progress states; see fiscal quarter dropdown |
| Date and time | DateTimePicker (input), InlineDateTimePicker (inline) |
| A short strip of days (next 7 days) | MiniCalendar (numberOfDays, single date only) |
| Time slots for a picked day | TimeGrid (data from getTimeRange or your API) |
| Month grid with your own selection rules, or display only | Calendar (+ useCalendar for an outside toolbar) |
| One month grid without header and navigation (year overview, heatmap) | Month |
| Header with previous/next and a label for your own grid | CalendarHeader |
| A button for one period in a custom grid (sprint, 4-4-5 period, fiscal grid requiring calendar navigation) | PickerControl |
| Weekday names row, a single day cell | WeekdaysRow, Day |
| Submit a custom picker's value with a native form | HiddenDatesInput |
Calendar takes the grid props of DatePicker (levels, columns, formats, getDayProps,
renderDay, excludeDate, minDate/maxDate) plus static, but not type, value,
onChange, presets or allowDeselect: selection is yours.
QuarterPickerInput already handles calendar-year quarters. Its year level and values are
calendar-based, so changing a cell's label does not turn the year into April–March FY2027. For a
fiscal quarter chosen from a dashboard filter, a grouped Select is simpler than a hand-built
popover or a re-labelled QuarterPickerInput. Use PickerControl and CalendarHeader only when
the quarter picker itself must be an interactive grid.
YYYY-MM-DD (DateStringValue) or YYYY-MM-DD HH:mm:ss with time.
Props accept Date objects too, but onChange, onDateChange, getDayProps, renderDay and
excludeDate always receive strings. Strings carry no timezone: 2026-03-08 is the 8th
wherever the user is.date >= start && date <= end), which is
the cheapest range test inside per-cell callbacks.dayjs (a required peer dependency) and convert back with
.format('YYYY-MM-DD') or toDateString(value). Never new Date('2026-03-08'): it parses as
UTC midnight and lands on the 7th west of UTC. dayjs('2026-03-08') parses as local midnight.YYYY-MM-DD once, when it arrives
(dayjs(iso).format('YYYY-MM-DD'), which is the user's local day). The package has no timezone
setting; when days must follow a venue's timezone, compute the date strings server-side or with
the dayjs utc/timezone plugins before they reach the calendar.DatesProvider settings={{ locale, firstDayOfWeek, weekendDays, consistentWeeks, labelSeparator, submitButtonLabel }} sets app-wide defaults; component props of the same names override them.
Defaults: locale: 'en', firstDayOfWeek: 1 (Monday), weekendDays: [0, 6],
consistentWeeks: true (every month shows 6 rows). A locale needs import 'dayjs/locale/de';
every *Format prop also accepts a function (date) => ReactNode, so Intl.DateTimeFormat can
replace locale imports.firstDayOfWeek; quarter values are the first day
of the quarter (getQuarterStart); month values are the first day of the month.| Hook | Where | What it is for |
|---|---|---|
getDayProps(date) | Calendar, all day pickers, Month, MiniCalendar | selected, inRange, firstInRange, lastInRange, onClick, onMouseEnter, onFocus, style, className, data-*, aria-* for one day |
renderDay(date) | Calendar, day pickers, Month, Day | Day content (number + price, dots, icon). Not on MiniCalendar |
excludeDate(date) | Calendar, day pickers, Month | Disables a day: not clickable, skipped by arrow keys |
minDate / maxDate | everywhere | Disables days and controls outside, disables previous/next at the edges |
getDayAriaLabel(date) | Calendar, day pickers, Month, MiniCalendar | Accessible name of a day; defaults to D MMMM YYYY |
getMonthControlProps(date) / getYearControlProps(date) | Calendar, DatePicker, MonthPicker, YearPicker, … | Same as getDayProps for year and decade levels; children replaces the label |
getQuarterControlProps(date) | QuarterPicker, QuarterPickerInput | Same for quarters |
getWeekControlProps(weekStart) | WeekPicker, WeekPickerInput | Props for week-number buttons (disable a week, aria-label) |
date + onDateChange | Calendar, pickers, MiniCalendar | Controlled displayed month: load data for it, jump to a month |
level / defaultLevel / minLevel / maxLevel / onLevelChange | Calendar, pickers | Which of 'month' | 'year' | 'decade' is shown and reachable |
onMonthSelect / onYearSelect, onMonthMouseEnter / onYearMouseEnter | Calendar | Clicks and hovers on month/year controls (selection at year level with minLevel="year") |
controller from useCalendar() | Calendar, DatePicker, WeekPicker, MonthPicker, QuarterPicker, YearPicker | Drive the displayed date and level from your own toolbar |
static | Calendar, Month, Day | Display only: days render as div, no keyboard, no grid role |
numberOfColumns, columnsToScroll, hideOutsideDates | Calendar, pickers | Several months side by side; pickers hide outside days when columns > 1, Calendar does not |
presets | pickers and picker inputs | { value, label }[] beside the calendar; a preset also moves the view to its first date |
withCellSpacing={false}, highlightToday, withWeekNumbers, fullWidth, size | Calendar, pickers | Connected ranges, today border, week numbers, stretch to container, cell size xs–xl |
classNames / styles with day, monthCell, monthRow, calendarHeader, … | Calendar, pickers | Styles API, see api |
Inside the grid, a day is rendered as <Day disabled={excluded or out of min/max} {...getDayProps(date)} />,
and pickers compute their own selected/inRange first and spread your getDayProps after them.
Your object wins on every key it contains, including keys whose value is undefined. Handlers
are the exception: your onClick, onMouseEnter and onKeyDown run first, then the built-in ones
(selection, keyboard navigation) still run. The same holds for getMonthControlProps,
getYearControlProps and MiniCalendar's getDayProps.
When the selection is a plain date, dates or range, keep the picker and add data to the cells:
import dayjs from 'dayjs';
import { useState } from 'react';
import { Indicator } from '@mantine/core';
import { DatePicker } from '@mantine/dates';
interface DeliveryDatePickerProps {
closedDays: Set<string>;
eventCounts: Map<string, number>;
}
function DeliveryDatePicker({ closedDays, eventCounts }: DeliveryDatePickerProps) {
const [value, setValue] = useState<string | null>(null);
return (
<DatePicker
value={value}
onChange={setValue}
minDate={dayjs().format('YYYY-MM-DD')}
excludeDate={(date) => closedDays.has(date)}
renderDay={(date) => (
<Indicator size={6} offset={-4} disabled={!eventCounts.has(date)}>
<div>{dayjs(date).date()}</div>
</Indicator>
)}
getDayAriaLabel={(date) => {
const count = eventCounts.get(date);
const label = dayjs(date).format('D MMMM YYYY');
return count ? `${label}, ${count} deliveries scheduled` : label;
}}
/>
);
}
When the rules differ (a stay whose checkout may fall on a booked night, a period of fixed length,
at most three dates), render Calendar and derive every day's state from your own value:
import { useState } from 'react';
import { Calendar } from '@mantine/dates';
function UpToThreeDates() {
const [selected, setSelected] = useState<string[]>([]);
const toggle = (date: string) =>
setSelected((current) =>
current.includes(date)
? current.filter((item) => item !== date)
: current.length < 3
? [...current, date]
: current
);
return (
<Calendar
getDayProps={(date) => ({
selected: selected.includes(date),
onClick: () => toggle(date),
})}
/>
);
}
Keyboard navigation, focus handling, levels and month switching keep working: they belong to
Calendar, not to the selection. For hover previews, add onMouseEnter and onFocus per day
and onMouseLeave on the Calendar root. Complete versions: patterns.
excludeDate, never with disabled in getDayProps. A disabled key
in the returned object replaces the result of excludeDate, minDate and maxDate for that
day: { disabled: isClosed || undefined } re-enables every past day. The same goes for
selected and inRange in pickers: return those keys only when you mean to replace the
picker's own state, and build objects without keys for "no change".aria-disabled and a data-* attribute for the look, ignore its click in your
handler, show the reason in text near the calendar on hover/focus/click, and put it in
getDayAriaLabel. This works with Calendar (you own the click); a picker would still select it.type="range" happily spans excluded
days and has no maximum length. Limit the second pick while the first is set
(excludeDate that reads value[0]), and validate the completed range in onChange: reject it
by setting a new value ([clickedDate, null] or [null, null]), not by ignoring the call.[clickedDate, null]), and a click before the first day picks backwards. Limits on the second pick shade days
instead of disabling them when disabling would leave no way to choose another start.highlightToday or pick another style. States that must be told apart differ by more than
the dash pattern of a 1px border.withCellSpacing={false}, mark every day between the
endpoints inRange for hover and keyboard-focus previews, not just the endpoints. Keep any
invalid-checkout styling off days inside that preview; the range's fill should remain continuous.onChange and show the error right away; a summary (working days, total price, balance) never
shows totals for a value that will be rejected on submit.currentColor for a changing measure such as moon phase; colorful emoji
dominate the day number and vary by platform. Keep the secondary number quieter than the date.Month grids beside that panel, not switch to two columns
just because the viewport is narrower than an unrelated breakpoint. Use size="xs", short
weekday labels, restrained month spacing and equal-width columns; check the narrowest column
with real month names and six-row months. fullWidth stretches each Month to its column;
avoid it when that makes individual day cells oversized. A day with no activity remains
unfilled (and is not a fifth shaded level); only positive amounts receive the four shades in
the legend. Do not hide the day number on an empty day. On phones the interactive week picker
comes before twelve months, or the overview gets shorter (fewer months, collapsible).Input.Wrapper label="Period type" labelElement="div" with a
SegmentedControl aria-label="Period type" fullWidth, followed by one labeled period input and
a labeled comparison Select. Switch the period control between
DatePickerInput type="range", MonthPickerInput
and a grouped fiscal-quarter Select; keep the three slots aligned and the selected-period
summary in plain text immediately below. When the host page supplies the title, do not wrap
this toolbar in another titled card or add a separate heading. Stack the slots at a narrow
container width, not just at a narrow viewport width, so an embedded dashboard panel works.
See fiscal quarter dropdown.renderDay is invisible to screen readers. Each day has an
aria-label, which overrides its content. Every price, count or status you render must also be
in getDayAriaLabel.sm).
Small dots or edge marks fit inside the default square with absolute positioning; only a real
second line of content needs a taller day via classNames/styles or a larger size. Text and
dots inside a day use currentColor, inherit and smaller font-size instead of their own
colors, so they stay readable on the filled background of selected days. Pass
weekendDays={[]} when your cells carry their own color coding (weekends are red by default).WeekPicker fills the
entire selected row, including future or out-of-bounds days. Those day buttons can remain
disabled without inheriting the row's contrast color: default dark or dimmed text on the filled
row becomes hard to read. Give disabled days in that selected row
color: var(--mantine-primary-color-contrast) and
opacity: var(--mantine-disabled-opacity) rather than a hard-coded gray or opacity. Keep
the rest of the calendar's disabled styling intact. When week numbers have a visible ring or
border, check the narrowest picker width: all seven days plus the week-number column must fit
without squeezing that ring into an oval. Use a smaller picker size if needed.getDayProps and excludeDate run several times per
day on every render (state, tab order, keyboard). Index your data once (Map/Set/object keyed
by YYYY-MM-DD, or values computed once per render) and keep the callbacks to lookups and
string comparisons.onDateChange reports whatever date the view moved
to (previous/next keep the day of the month, a month click gives its first day). Derive data
keys with dayjs(date).startOf('month'), and with numberOfColumns={n} load n months.
Without hideOutsideDates, the grid also shows days of neighbouring months.width on classNames.day (room for a price or an icon) leave the header narrower than the
grid. Use size (xs–xl) when a preset fits: it scales days, weekdays and header together,
but also enlarges the day number. For a custom width, set --dch-control-size on
classNames.calendarHeader to the same value as the day width, including any media query.headerControlsOrder reorders it) and put extra controls (Today, a legend) in a row
above it. When your toolbar replaces the header (hidden with classNames.calendarHeader, the
date driven by useCalendar), previous/next are
ActionIcon variant="default" with the calendar's cell size (size={36} at size="sm"), the
label uses the header's weight and size (fw="var(--mantine-font-weight-medium)", size="sm"),
and Today is Button variant="default" size="xs". Default-size buttons next to a 36px grid look
oversized.static is display only. It turns days into divs with no keyboard support and drops the
grid role. Interactive calendars stay non-static, even if clicks only open details. A standalone
Month (outside Calendar) has no arrow-key navigation either: an interactive grid is a
Calendar, which supplies the keyboard model; standalone Month is for overviews.Calendar shows duplicate days. Pickers hide outside days when
numberOfColumns > 1; Calendar does not, so pass hideOutsideDates yourself.getStartOfWeek(date, firstDayOfWeek) and
getEndOfWeek follow DatesProvider; hard-coding Monday breaks Sunday-first locales.
getStartOfWeek loops forever on an invalid date: validate (dayjs(value).isValid()) first..quarter(),
startOf('quarter') or .isoWeek() extends dayjs with quarterOfYear/isoWeek itself (and
customParseFormat for parsing), even though the package registers some of them internally.MonthLevel, YearLevel, DecadeLevel, their *Group versions, LevelsGroup,
MonthsList and YearsList are no longer exported. Use Calendar with
minLevel/maxLevel/level, or build the grid from Month, PickerControl and
CalendarHeader.consistentWeeks defaults to true: every month renders 6 rows.useCalendar and the controller prop are new: they drive the displayed date and level from
outside. Picker inputs have useDatePickerInput, useWeekPickerInput, useMonthPickerInput,
useQuarterPickerInput and useYearPickerInput.Calendar with week hover in getDayProps) can be replaced with
WeekPicker (9.8+); hand-built calendar-year quarter pickers with QuarterPicker.references/patterns.md: complete examples: stay picker with
nightly prices and booked nights, rental range that cannot cross closed days, day + time slots,
event dots with a day agenda, unavailable days with reasons, fixed-length period with hover
preview, multi-month range input with presets and a maximum length, activity heatmap with
streaks, fiscal quarter dropdown, custom quarter grid from primitives, toolbar and per-month
data loading.references/api.md: exports, Calendar/Month/Day/
PickerControl/CalendarHeader props, useCalendar controller, picker value types, Styles API
names and data attributes.If the references do not cover what you need, do not guess:
@mantine/mcp-server) is connected, use search_docs and get_item_doc.https://mantine.dev/llms.txt and open the Calendar, DatePicker or the
relevant picker page.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub mantinedev/skills --plugin mantine9 skills in this plugin
/mantine-comboboxBuild custom dropdown/select/autocomplete/multiselect components using Mantine's Combobox primitives. Use this skill when: (1) creating a new custom select-like component with Combobox primitives, (2) building a searchable dropdown, (3) implementing a multi-select or tags input variant, (4) customizing option rendering, (5) adding custom filtering logic, or (6) any task involving useCombobox, Combobox.Target, Combobox.Option, or Combobox.Dropdown.
/mantine-custom-componentsBuild custom components that integrate with Mantine's theming, Styles API, and core features. Use this skill when: (1) creating a new component using factory(), polymorphicFactory(), or genericFactory(), (2) adding Styles API support (classNames, styles, vars, unstyled), (3) implementing CSS variables via createVarsResolver, (4) building compound components with sub-components and shared context, (5) registering a component with MantineProvider via Component.extend(), or (6) any task involving Factory, useProps, useStyles, BoxProps, StylesApiProps, or ElementProps in @mantine/core.
/mantine-data-gridBuild data tables with `@mantine/data-grid` (DataGrid on TanStack Table v9). Use this skill when: (1) building an admin list, orders table or any table with sorting, filtering or pagination, (2) connecting a grid to an API with server-side sorting, filtering and pagination, (3) adding row selection with bulk actions, row actions or inline cell/row editing, (4) rendering grouped rows, tree data, pinned or resizable columns, or 10k+ rows with virtualization, (5) adding a toolbar, filter controls, export or a custom footer to a grid, or (6) any task involving `DataGrid`, `useDataGrid`, `DataGridColumnDef` or `@tanstack/react-table` inside a Mantine app.
/mantine-formBuild forms using @mantine/form. Use this skill when: (1) setting up a form with useForm, (2) adding validation rules, schema validation (zod, valibot, arktype) or async validation, (3) working with nested object or array fields, (4) reading values, dirty or touched state during render (useWatchValue, useDirty, useTouched), (5) splitting a form into components or reusing field components across forms (createFormContext, getField), (6) building custom inputs that work with getInputProps (useFormField), (7) using the standalone useField hook, or (8) any task involving useForm, getInputProps, onSubmit, insertListItem, or form validation.
/mantine-scheduleBuild calendar and scheduling interfaces with @mantine/schedule. Use this skill when: (1) adding a day, week, month, year or agenda calendar (Schedule, DayView, WeekView, MonthView, YearView, AgendaView, MobileMonthView), (2) building a booking page, team rota, room planner or any view with people, rooms or machines as rows (ResourcesSchedule, ResourcesDayView, ResourcesWeekView, ResourcesMonthView), (3) creating events by clicking or drag-selecting slots, (4) moving or resizing events with drag and drop and rejecting invalid placements, (5) recurring events (rrule, exceptions, single-occurrence edits), (6) business hours, blocked time or other background events, (7) custom event rendering, or (8) any task involving ScheduleEventData, onEventDrop, onSlotDragEnd or onTimeSlotClick.
/mantine-testingWrite and run component tests for interfaces built with Mantine (React Testing Library, user-event, jsdom with vitest or jest). Use this skill whenever a task asks for tests of a Mantine component or form, or when existing tests of Mantine UI fail in jsdom: (1) render setup and jsdom stubs, (2) how to interact with Mantine inputs in tests (selects, number inputs, date pickers, phone input, checkboxes, segmented controls), (3) modals, drawers, notifications and other portals, (4) drag and drop with dnd-kit, (5) forms built with @mantine/form, (6) fake timers and async validation, or (7) test structure and naming.
Other plugins' skills for the same job