Scheduling infrastructure for absolutely everyone.
Fixed bug that kept the date enabled when the time slot was less than 30m
Alex van Andela28cb455f16e
diff --git a/components/booking/DatePicker.tsx b/components/booking/DatePicker.tsxindex 86fda259220..1bea6caf65c 100644--- a/components/booking/DatePicker.tsx+++ b/components/booking/DatePicker.tsx@@ -7,7 +7,14 @@ import getSlots from "@lib/slots";dayjs.extend(utc);dayjs.extend(timezone);-const DatePicker = ({ weekStart, onDatePicked, workingHours, organizerTimeZone, inviteeTimeZone }) => {+const DatePicker = ({+ weekStart,+ onDatePicked,+ workingHours,+ organizerTimeZone,+ inviteeTimeZone,+ eventLength,+}) => {const [calendar, setCalendar] = useState([]);const [selectedMonth, setSelectedMonth]: number = useState();const [selectedDate, setSelectedDate]: Dayjs = useState();@@ -43,7 +50,7 @@ const DatePicker = ({ weekStart, onDatePicked, workingHours, organizerTimeZone,date.endOf("day").isBefore(dayjs().tz(inviteeTimeZone)) ||!getSlots({inviteeDate: date,- frequency: 30,+ frequency: eventLength,workingHours,organizerTimeZone,}).lengthdiff --git a/pages/[user]/[type].tsx b/pages/[user]/[type].tsxindex 1a8b670a6b0..e56ed4c6091 100644--- a/pages/[user]/[type].tsx+++ b/pages/[user]/[type].tsx@@ -128,6 +128,7 @@ export default function Type(props): Type {workingHours={props.workingHours}organizerTimeZone={props.eventType.timeZone || props.user.timeZone}inviteeTimeZone={timeZone()}+ eventLength={props.eventType.length}/>{selectedDate && (<AvailableTimes