apps/mantine.dev/src/pages/dates/mini-calendar.mdx
import { MiniCalendarDemos } from '@docs/demos'; import { Layout } from '@/layout'; import { MDX_DATA } from '@/mdx';
export default Layout(MDX_DATA.MiniCalendar);
Use numberOfDays prop to control how many days are displayed at once.
The default value is 7.
Use getDayProps to add custom props to days, for example, assign styles to weekends:
Use minDate and maxDate props to limit date selection:
You can change localization both on component level with locale prop and
globally with DatesProvider.
Alternatively, pass a function to the monthLabelFormat prop to format month labels
with Intl.DateTimeFormat instead of dayjs – see
formatting without dayjs.
Use nextControlProps and previousControlProps to add aria-label and other props to navigation buttons:
import { MiniCalendar } from '@mantine/dates';
function Demo() {
return (
<MiniCalendar
nextControlProps={{ 'aria-label': 'Next range' }}
previousControlProps={{ 'aria-label': 'Previous range' }}
/>
);
}