fix: correct month after changing time zone (#5635)

Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
Udit TakkarandPeer Richelsen authored and GitHub committed 2022-11-22 13:09:23 +00:00
1 parent c98bafcd52
commit df91425643
1 file changed
+3 -2
+3 -2
View File
@@ -138,9 +138,10 @@ const DatePicker = ({
onMonthChange(browsingDate.add(newMonth, "month"));
}
};
const month = browsingDate
? new Intl.DateTimeFormat(i18n.language, { month: "long" }).format(new Date(browsingDate.toISOString()))
? new Intl.DateTimeFormat(i18n.language, { month: "long" }).format(
new Date(browsingDate.year(), browsingDate.month())
)
: null;
return (