I m a little stuck here and i would like to ask for your help.
I m making a website for a hostel and this is what i have:
Users can book a room. Rooms are dynamic values added by admin (Type = rooms)
Reservations, created by current user. When a reservation is completed, i get (the most important):
Number of rooms (List of Rooms)
Check in Date
Check out Date
I also add this reservation to the Rooms (list of reservations). Basically each room, can have one or more reservations. Once the check out date is reached, i delete the reservation from the Rooms type, column reservations.
My question is:
How can i hide the rooms that are booked in the date interval choosen by user?
The way I’m going about it right now is creating a “list of dates” column in my database that would house all of the individual dates that are “blocked” due to a reservation. For example, if a user says they want to stay in a room from 1/1/2016 to 1/10/2016, I am going to attempt to get every single individual date between those two dates into the database from the front end (1/2/2016…1/19/2016). That way we have the individual specific dates that are blocked in the database itself so that we can use the data in the right way. Figuring out how to make this happen is going to be very difficult haha, but I’m going to spend a lot of time seeing if it is possible because it’s the only way I can see it can be done now. Will let you know.
Would it help to have a “date range” field type, where you could enter a starting date/time, and an ending date/time, and do searches filtering on “where this date is in this date range / not in this date range” or these date ranges overlap? It’s something we’re considering adding, so if it would make this easier, that’d be a vote in favor of us spending time on it.
Hey Josh, I think that would be amazing to add. Given that this functionality does not exist at the moment, do you know how websites that depend on date-based bookings are handling this right now? If there aren’t any websites hosted by bubble that engage in this functionality yet I totally understand; I’m just wondering if you know of any way to do this with the way bubble is built right now.Thanks!
Josh and Emmanuel and the rest of the Bubble team, thank you so so much for taking this into consideration! I think this is going to help an incredible amount of people who develop applications for many different verticals. I’m amazed at how just us simply discussing the issue is leading to a feature being created to solve the problem. Amazing work guys keep it up! And as cm1 just said, I am so proud and happy to be using this application because it has changed my life!
So if I read the thread correctly, there will be a feature released that enables certain dates to be “blocked out” on the date and time picker? Any update on this @josh ?