Blocking reserved dates with Air Time / Date picker from Zeroqode

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 :frowning:

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.

I’ve worked on a very similar situation recently, so I should be able to help…

But I’m not sure I understand the problem you’re having with a single date (it shouldn’t be any different)…

Can you give a bit more context - i.e. how your database is set up, what exactly you’re trying to do (is this a search page or a booking page?), and the specific issues you’re having with the single date?

dear @adamholmes, you will have my deepest gratitude.
The issue is complex, and I tried to be as synthetic as possible.

I can assure you that, unfortunately, it doesn’t seem at all that single dates are created equal to ranges, as far as this issue is concerned.

Yes, I am working with bookings.

On the fron end the situation is as such:
1.Search page with the time/date pickers>2.Results page (where the unavailable locations should be excluded>3.Page in which the booking is confirmed.
From point 1 the dates are sent via URL to points 2 and 3.

For the “date ranges” I send “start date” and “end date” in the URL. If a single day is selected, I send “single date” in the URL. These parameters , again, are carried to point 3, and then stored in the DB if the booking is made.

In the DB I have the following fields:
a. “start date”,
b. “end date”,
c. “booking dates” (where a range from “start date” to “end date” is stored)
d. “single date” (self explanatorily storing the single day)
e. “single date range” (in the original post, called the dummy range, saving, for example, Dec 1 - Dec 1).

In the point 2 of the above description I have the hidden repeating groups that I mentioned, in which the previous bookings are searched, and the subsequent list is subtracted from the available results.

I hope this clarifies further without being too cumbersome.

Thanks again

Hello @danpagano82,

We appreciate your detailed explanation of the issue you’re facing. In order to better understand your setup, we kindly request you provide us with a video demonstrating the issue you’re experiencing. This will help us identify the root cause and provide you with an appropriate solution. Thank you in advance for your cooperation. :pray:

Best regards,
Zeroqode Support Team

And again, thank you.
Well, to sum it up pretty shortly:

  1. I was forced to have two separate flows : a.for the case in which users selects ONE day, b. For the case the user selects TWO or more days.
  2. When the either the FIRST user or the SECOND user, or both, select to book for ONE day, then the problems arise, and I am not able to prevent the second user to see and book the result which should NOT be bookable, because already taken.

Anyway, if you really do prefer a video, please do write where I can share it privately.

Thank you again

Hello,
In thanking you again for your initial interest, may I ask you if youàve got any more ideas on the matter?
Thanks.

Hi @danpagano82,

We have sent you a DM, please check your inbox. Thanks!

Best regards,
Zeroqode Support Team