How to hour range instead of date range

Hi, I just started dabbling into no code and trying to re-create AirBnB for getting familiar with Bubble and practicing.

I figured a way to get the app working for “from and to” dates by creating an accomodation dimension table with a date range for the booking dates, where when a user books an accomodation that accomodation’s date range field gets updated for those booking dates.

However, I want to try enabling users to rent an accomodation by the hour. I couldn’t figure out a way to do this, any ideas, any support is appreciated. While searching for an existing solution, I saw that date range data type is a relatively new feature and tried to find how it used to be before this feature thinking it would be the solution for hourly rentals but couldn’t find anything. I combed through through the forum as well but no solutions.

Thanks in advance!

You can achieve the same functionality with Date Ranges.
In bubble (and in programming in general) dates are actually date/times - they represent a particular point in time, down to the millisecond.
So if you want to allow hour bookings, you can still use date ranges. Just make sure that when you let users choose their booking times, the selection process lets them choose down to the hour, instead of just a day. Most calendar plugins allow for hour selection.

I warn you that hourly availabilities and bookings is not the simplest of features to deal with in general, as timezones + lots of data comes into play.

This is a good resource to start understanding dates.

2 Likes

That makes sense, thank you!