Skip to Content
Version 2.0 is out with React 19 support and an ESM build. Read the migration guide →
Localization & formats

Localization & formats

Four props control language and formats:

PropControlsDefault
localeDay and month namesenUS from date-fns
timeDateFormatHow weekdays, hours and the month title are formatted{ day: 'EEE', hour: 'hh a', monthYear: 'MMMM yyyy' }
weekStartsOnThe first day of the week1 (Monday)
todayLabelThe text of the “Today” button'Today'
View
Loading calendar…

locale

Pass any locale object from date-fns. Install date-fns in your app to import one:

npm install date-fns
import { de } from 'date-fns/locale'; <Calendar locale={de} todayLabel="Heute" />;

Use the same major version of date-fns as the calendar, which is version 4, so your app does not bundle two copies.

todayLabel

The calendar does not translate its “Today” button through the locale. Set the text yourself:

<Calendar locale={fr} todayLabel="Aujourd'hui" />

timeDateFormat

An object with up to three date-fns format strings . Keys you leave out keep their defaults.

KeyWhere it appearsDefaultExample output
dayWeekday names above the columns'EEE'Mon
hourHour labels on the timeline'hh a'09 AM
monthYearThe title of the navigation'MMMM yyyy'June 2025

Some useful tokens:

TokenOutputTokenOutput
EEEEEMHH:mm09:00 (24-hour)
EEEEEEMoHH09
EEEMonh a9 AM
EEEEMondayH9
LLL yJun 2025LLLL yyyyJune 2025
<Calendar timeDateFormat={{ day: 'EEEEEE', // two-letter weekday names hour: 'HH:mm', // 24-hour clock monthYear: 'LLLL yyyy', }} />

For the month title in languages that inflect month names, such as Serbian or Polish, use the standalone tokens LLLL and LLL rather than MMMM and MMM.

Full weekday names (EEEE) can be wider than a day column in the week views, especially in German or French. Prefer EEE or the two-letter EEEEEE there.

weekStartsOn

A number from 0 (Sunday) to 6 (Saturday). It affects MONTH, WEEK, WEEK_TIME and WEEK_IN_PLACE. It is not taken from the locale, so to follow the locale’s convention pass it along:

<Calendar locale={de} weekStartsOn={de.options?.weekStartsOn ?? 1} />

Item times

The time shown inside default items uses a fixed short format, such as 9:00AM. To show it in another format or language, render the text yourself with renderItemText:

import { format } from 'date-fns'; import { de } from 'date-fns/locale'; <Calendar locale={de} renderItemText={(item) => ( <> <div>{item.title}</div> <div>{format(new Date(item.startTime), 'p', { locale: de })}</div> </> )} />;
Last updated on