Dynamic time slot in bubble

Hi guys!

I am new to bubble and I am trying to build a time and duration based service web app. Currently, I am unable to figure out how do I build a feature where the users can select/input their start and end time for availing the service in a particular date. Once selected, if the service is available by the service provider, the user can book the same. Please note: the time slot is dynamic since the duration chosen by the user can vary.

Thanks in advance for any advice!

Okay. I think you should descripe your service a bit more.
You could provide a frontend where user A can select date (range) and timeslot(s). After that store that data in the database.
In your enduser’s page you could provide a calendar object for example to present the timeslots stored in the db.
That way maybe … ?
Best,
jupxi

The service I am trying to provide is- Time based hotel booking. Instead of booking a hotel for the whole day, the users can book the hotel for the duration they desire (1 hour, 2hours, etc.).

For example- if the user chooses to book the hotel for duration of 3 hours, then the time range that the user can select should also be of 3 hours (example- 4pm- 7pm). When the user selects the booking time (4pm- 7pm) and the hotel is booked from 5pm- 7pm already, then the user should not get an option to book the hotel.

Okay.
You could create a table in your database “bookings”.
In this table you can store all bookings (on a daily base).

Table structure with demo record:

DATETime // StartDateTime // EndDateTime // …
-------------//---------------------//----------------//…
02/15/2024 12:00:00 am// 02/15/2024 08:00:00 am // 02/15/2024 10:00:00 am // …

You can create a repeating group with 16 rows (for example 16 hrs to book the hotelroom per day) . In the RG’s elements you can display the time slot (08:00 - 09:00 am) and enable the user to select it (or something…). Then you should integrate a condition that disables the current time slot booking checkbox (or something) by checking the db with a do a search by… and search the db, if the current date and timeslot (coming from the RG) has an entry in the db (count > 0) then disable the booking checkbox to prevent the booking for the current timeslot on that day.
Oh oh… my english is not so well as you can see. I hope, I could explain it a bit…
Best,
jupxi
If a user selects a day (date dropdown/picker) then you could

This plugin provides the functionality you are looking for

Thanks!

I will check it out!