Skip to content

Commit b7f3691

Browse files
committed
fix(calendar-web): custom view fix
1 parent 6a487f6 commit b7f3691

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/pluggableWidgets/calendar-web/src/helpers/useLocalizer.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ function createLocaleFromMendixData(mendixLocale: ReturnType<typeof getMendixLoc
5858
}
5959
} as Localize,
6060
formatLong: {
61-
date: () => "P",
62-
time: () => "p",
63-
dateTime: () => "Pp"
61+
// Use actual format strings from Mendix patterns, not tokens
62+
// These are used when P/p tokens are encountered in format strings
63+
date: () => mendixLocale?.patterns?.date || "MM/dd/yyyy",
64+
time: () => mendixLocale?.patterns?.time || "h:mm a",
65+
dateTime: () => mendixLocale?.patterns?.datetime || "MM/dd/yyyy, h:mm a"
6466
} as FormatLong,
6567
formatDistance: () => "",
6668
formatRelative: () => "",

0 commit comments

Comments
 (0)