Skip to content

Scheduling infrastructure for absolutely everyone.

[CAL-280] mobile booking: selecting a day does not scroll first time (#5682)

GitStart0b5a0186bc34
diff --git a/packages/ui/v2/modules/booker/DatePicker.tsx b/packages/ui/v2/modules/booker/DatePicker.tsx
index 4b7a2fd2f28..76e48fa7c50 100644
--- a/packages/ui/v2/modules/booker/DatePicker.tsx
+++ b/packages/ui/v2/modules/booker/DatePicker.tsx
@@ -105,10 +105,12 @@ const Days = ({
date={day}
onClick={() => {
props.onChange(day);
- window.scrollTo({
- top: 360,
- behavior: "smooth",
- });
+ setTimeout(() => {
+ window.scrollTo({
+ top: 360,
+ behavior: "smooth",
+ });
+ }, 500);
}}
disabled={
(includedDates && !includedDates.includes(yyyymmdd(day))) ||