diff --git a/examples/ItalianLabels.tsx b/examples/ItalianLabels.tsx index 307e76367..d89778323 100644 --- a/examples/ItalianLabels.tsx +++ b/examples/ItalianLabels.tsx @@ -10,7 +10,7 @@ export function ItalianLabels() { locale={it} labels={{ labelDayButton: (date, { today, selected }) => { - let label = format(date, "PPPP"); + let label = format(date, "PPPP", { locale: it }); if (today) label = `Oggi, ${label}`; if (selected) label = `${label}, selezionato`; return label; diff --git a/website/docs/docs/translation.mdx b/website/docs/docs/translation.mdx index 106bb02a8..37324239c 100644 --- a/website/docs/docs/translation.mdx +++ b/website/docs/docs/translation.mdx @@ -38,7 +38,7 @@ function ItalianLabels() { locale={it} labels={{ labelDayButton: (date, { today, selected }) => { - let label = format(date, "PPPP"); + let label = format(date, "PPPP", { locale: it }); if (today) label = `Oggi, ${label}`; if (selected) label = `${label}, selezionato`; return label;