We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 014a293 commit 04cf9f1Copy full SHA for 04cf9f1
1 file changed
packages/react-date-picker/src/shared/dateFormatter.ts
@@ -15,10 +15,9 @@ export function getFormatter(
15
const formatterCacheLocale = formatterCache.get(localeWithDefault);
16
17
if (!formatterCacheLocale.has(options)) {
18
- formatterCacheLocale.set(
19
- options,
20
- new Intl.DateTimeFormat(localeWithDefault || undefined, options).format,
21
- );
+ const formatter = new Intl.DateTimeFormat(localeWithDefault || undefined, options);
+
+ formatterCacheLocale.set(options, formatter.format.bind(formatter));
22
}
23
24
return formatterCacheLocale.get(options)(date);
0 commit comments