Book a soccer pitch⚽📅

You will have a crazy amount of available choices if you’re using a choice component.

I think an event picker is better for this case, but that doesn’t reduce the complexity of it. You will likely have to do a combination of the things listed below:

  • Use a custom form.
  • Have an event picker to allow users to choose a duration for their booking.
  • Have some validation checkers here: Whether the start time is in the allowed time frame, whether the end time is in the allowed time frame, and whether it overlaps with any other existing bookings.
  • If all those conditions are satisfied, have a button to add a row to your bookings table.
2 Likes