fix: correct month after changing time zone (#5635)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
co-authored by
Peer Richelsen
parent
c98bafcd52
commit
df91425643
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user