Change startTime to current date - 2 days if startTime it's on current month (#6117)

Co-authored-by: Alex van Andel <me@alexvanandel.com>
pull/6137/head^2
alannnc 2022-12-21 08:11:42 -07:00 committed by GitHub
parent 0770403ca5
commit 9de19d35a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -151,7 +151,10 @@ const SlotPicker = ({
eventTypeId: eventType.id,
eventTypeSlug: eventType.slug,
usernameList: users,
startTime: browsingDate?.startOf("month"),
startTime:
browsingDate === undefined || browsingDate.get("month") === dayjs.tz(undefined, timeZone).get("month")
? dayjs.tz(undefined, timeZone).subtract(2, "days").startOf("day")
: browsingDate?.startOf("month"),
endTime: browsingDate?.endOf("month"),
timeZone,
duration,