Hello to you all, beautiful community.
I have big problem HERE, Please, PLEASE help me.
I have a marketplace and am allowing reservations for DAYS (rather than nights, as in airbnb).
With the otherwise excellent plugin “Air time/date picker” by @ZeroqodeTeam I was forced to plan two separate flows for:
-(1)Booking of 2 or more days (a “date range”, in bubble terms),
-(2)Booking of 1 day (a “date”).
When a subsequent user tries to book the SAME LOCATION for the same “date range” or “date” days (hypothese (1) from above) I need, of course, to make the location UNAVAILABLE.
I managed this FOR DATE RANGES by creating an hidden repeating group in which I “do a search for” all the bookings of the selected location which dates “OVERLAPS WITH” the date range the subsequent user is trying to select, and then I subtract the searched locations. [case of 2 conflicting date ranges: success!]
But when it come to single “DATE”, I am in a world of pain, and boy for so long now
I tried replicating the successful strategy described above for the date ranges, with the difference that , in the hidden group, I “do a search for” the bookings which “contains point” of the single date the subsequent user is trying to book. But this doesn’t work: the subsequent user is still able to see the location for the date in which it should be unavailable. [Case of date range conflicting with a single date:failure]
I also tried to create a “dummy” range in which the start and the end date coincide with the single day the users make the reservation for (i.e range from dec 1 to dec 1). Subsequently I tried to use the above mechanics comparing the SINGLE DATE selected by the second user attempting the reservation to the “dummy” date range of previous single dates (i.e. 1 dec-1 dec). [Case of single date conflicting with a single date: failure]
A BIG, BIG thanks to everyone who points me in the right direction on this. It is my major hurdle to my long dreamt of MVP.