I use the calendar on Glide page. To display a slot I need a start date and a end date.
It’s displayed like a slot on the app, but in the database is not possible to know days booked between the start and the end date.
My goal is to allow people to book a flat thanks to this calendar.
1 person book 1 flat during a slot : Start date & end date
If another person want to book on the same slot, he is not allowed to book .
Here the process:
tap a button
open pop up
enter start date
enter end date
If one of these date is on a slot show a warning message and don’t allow to book the slot.
Write both start and end dates to user specific columns
Use a pair of single value columns to apply those to all rows in your bookings table
Create an if-then-else column:
– If SV Start Date is after Booking End Date, then null
– If SV End Date is before Booking Start Date, then null
– Else true
Then do a rollup on the if-then-else column, counting true values. If the result is greater than zero, then you have an overlapping date.
NB. I may not have the if-then-else logic exactly right there - I might have missed a condition or two - but it should give you the idea
Hola @Aymeric_de_Maussion , sorry for the late reply, I’ve been busy these days.
What Darren indicated above is the classic procedure to do these things but in my case, when I needed an array of dates for my booking APP was due to I used another flow/logic to get a booking.
The classic flow has 2 choices: Start Day and End Day and users have to mark both values in order to trigger the logic and receive a message:
Valid: There is an available slot. The process continues and APP asks for more info
Invalid: There is no an available slot. The user has to select another date(s) and the cycle starts over
My logic avoids asking for the End Day. The user only selects the Start Day and APP shows all available slots from this day. With this, the flow is easier and faster when the amount of busy slots is medium or high but to get this, I had to create an array of dates, sort it and use it in my logic.
Unfortunately I can’t show you my demo APP for this, I deleted one of my Glide Tables accidentally days ago and my logic got crazy … I have to rebuild part of the APP and I haven’t had time to do it until now.
Anyway, if you are looking for an easy way to get a booking system, the @Darren_Murphy’s instructions are fine and can help you 90%. All depends on your needs and/or skills.