Now a user can choose a timezone to display slots when scheduling a meeting

This commit is contained in:
Leonardo Stenico committed 2021-05-06 19:36:57 +02:00
1 parent 926a37c31b
commit 084c7db559
2 files changed
+57 -49

No files matched your search

+2 -2
View File
@@ -23,7 +23,7 @@ const getSlots = ({
if(!selectedDate) return []
const lowerBound = selectedDate.startOf("day");
const lowerBound = selectedDate.tz(selectedTimeZone).startOf("day");
// Simple case, same timezone
if (calendarTimeZone === selectedTimeZone) {
@@ -42,7 +42,7 @@ const getSlots = ({
return slots;
}
const upperBound = selectedDate.endOf("day");
const upperBound = selectedDate.tz(selectedTimeZone).endOf("day");
// We need to start generating slots from the start of the calendarTimeZone day
const startDateTime = lowerBound