Morning all. I’m writing an app that books four rooms across multiple days. Works fine so far but I’m wondering how I could check validation when try to book to ensure that the same room hasn’t been booked for the same days. To throw a spanner in the works, it is ok if the first or last day of the booking overlaps with another booking for same room (as check out could be in morning allowing another check in in afternoon). I’m not worried about times, just dates.
Eg., Room One booked from 18 Sept to 25 Sept, therefore Room One can also be booked from 25 Sept to 27 Sept, or from 16 Sept to 18 Sept.
What would be the best way to approach this? Would really appreciate a point in the right direction as I’m just not sure.
I’ve looked at the Simple Booking App tutorial from Loqode (as well as a number of others) but it makes a helper table for time slots on a set day… that wouldn’t work for me because I’m not doing time slots but days.