fix: email embed displaying wrong date (#14128)

This commit is contained in:
Udit Takkar
2024-03-18 20:25:57 +05:30
committed by GitHub
parent a30555018f
commit c42571df03
+2 -7
View File
@@ -385,7 +385,7 @@ const EmailEmbedPreview = ({
Object.keys(selectedDateAndTime)
.sort()
.map((key) => {
const date = new Date(key);
const selectedDate = dayjs(key).tz(timezone).format("dddd, MMMM D, YYYY");
return (
<table
key={key}
@@ -406,12 +406,7 @@ const EmailEmbedPreview = ({
color: "rgb(26, 26, 26)",
fontWeight: "bold",
}}>
{date.toLocaleDateString("en-US", {
weekday: "long",
month: "long",
day: "numeric",
year: "numeric",
})}
{selectedDate}
&nbsp;
</span>
</td>