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

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
5628-cal-423-videoconferencing-app-category-naming-inconsistency
Udit Takkar 2022-11-22 18:39:23 +05:30 committed by GitHub
parent c98bafcd52
commit df91425643
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -138,9 +138,10 @@ const DatePicker = ({
onMonthChange(browsingDate.add(newMonth, "month")); onMonthChange(browsingDate.add(newMonth, "month"));
} }
}; };
const month = browsingDate 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; : null;
return ( return (