Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ function App() {
|
|||||||
|
|
||||||
const lang =
|
const lang =
|
||||||
[userLanguage, settingsLanguage, savedLang, defaultLang].find(
|
[userLanguage, settingsLanguage, savedLang, defaultLang].find(
|
||||||
(l): l is string => isValidLanguage(l)
|
(l) => !!l && isValidLanguage(l)
|
||||||
) || "en";
|
) || "en";
|
||||||
|
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
|
|||||||
@@ -992,10 +992,9 @@ function formatEnd(
|
|||||||
const startDate = new Date(start);
|
const startDate = new Date(start);
|
||||||
const endDate = new Date(end);
|
const endDate = new Date(end);
|
||||||
|
|
||||||
const sameDay =
|
const formatDatePart = (d: Date) =>
|
||||||
startDate.getFullYear() === endDate.getFullYear() &&
|
d.toLocaleDateString("en-CA", { timeZone }); // YYYY-MM-DD format
|
||||||
startDate.getMonth() === endDate.getMonth() &&
|
const sameDay = formatDatePart(startDate) === formatDatePart(endDate);
|
||||||
startDate.getDate() === endDate.getDate();
|
|
||||||
|
|
||||||
if (allday) {
|
if (allday) {
|
||||||
return sameDay
|
return sameDay
|
||||||
|
|||||||
Reference in New Issue
Block a user