Skip to content

fix: update BookingCalendar time axis to meet earliest booking if earlier than 9am - #836

Merged
Cfla446 merged 6 commits into
devfrom
780-Bookings-before-9am
Jul 17, 2026
Merged

fix: update BookingCalendar time axis to meet earliest booking if earlier than 9am#836
Cfla446 merged 6 commits into
devfrom
780-Bookings-before-9am

Conversation

@Cfla446

@Cfla446 Cfla446 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What

Updated BookingCalendar to display the 'min' (the earliest time along the y axis) as a dynamically calculated value depending on the earliest event during that day or week. This value is bounded to be at the earliest 5AM, and at its latest be 9AM.

Why

Previously, any bookings that occurred before 9AM would not display correctly, e.g. an event from 8AM-9AM would display beginning at 9AM along the axis. Alongside this events that would occur after such an event would visually collide with the previous event even though they shouldn't.

How

Used a useMemo to to identify, based on the day/week depending on the view, and if theres no events or the earliest event occurs during/after 9AM, then keep the default 9AM start time for the calendar. Else if an earlier event is found, bound it between 9AM and the earliest allowed time (5AM) and update the minimum time along the calendar axis to this new starting hour.

*The change to useFavourites was due to a bug in the snapshot cacheing that was occurring in rare cases

Screenshot / Recording

Before
image

After
image

@Cfla446
Cfla446 requested a review from a team as a code owner July 3, 2026 12:16
@Cfla446 Cfla446 linked an issue Jul 3, 2026 that may be closed by this pull request

@RyanYensch RyanYensch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome

@Cfla446
Cfla446 merged commit 0281da0 into dev Jul 17, 2026
4 checks passed
@Cfla446
Cfla446 deleted the 780-Bookings-before-9am branch July 17, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG#6: Bookings before 9am

2 participants