Dynamic Scheduling Based on Time Slots

I’m trying to create a two-sided marketplace with parents on one side and Experts on the other. The idea is to allow the parents to select a topic they want to discuss with an Expert and then return a list of times when Experts who can help with that topic are available. I’d like to put it onto a calendar so parents can pick a slot that works for them. For more details on the service, see our website: www.VillageCCE.com

I have allowed Experts to create Time Slots so they can say something like “I am available on Tuesdays from 4:00 PM to 6:00 PM”. Below are screenshots of the Time Slot data Thing and sample data. As you will see, I have the date portion of the datetime stamp defaulting to 1/1/70 because it does not really matter; I’ve captured the Weekday in another field so I’m just interested in the time component of the datetime. I’ll explain the “JS Wkd Number” field in a second, but it corresponds to the number returned by the JavaScript .getDay() method for a numerical weekday value.

Time Slot Data Thing

Sample Data

The challenge that I’m facing is that I cannot adapt these Time Slots on the fly to populate into the Full Calendar against the current date (i.e. Tuesday, 4/12 from 4:00 PM to 6:00 PM). It seems like a bad practice to store all of these possible values (4/12, 4/19, etc.) in the database to query them so I’m trying to avoid that. Let me breakdown where I am so far:

  • Parent selects a challenge to discuss
  • App searches for Experts who have the appropriate skill set
  • App returns the list of Time Slots for the matching Experts
  • Using the Toolbox Plugin, use the .setFullYear() method on the time portion of the “Start (Date)” & “End (Date)” attributes of the Time Slot to create a list of Bubble “date ranges” to adjust the Time Slots against the current date (code below)

From here, I would like to put these onto the Full Calendar but it only allows “events” to be a Thing stored in the database.

Any suggestions on a work around here? I’m willing to consider dropping the returned values into a repeating group and selecting from there, but I think the calendar view is best.

I’m aware that I might be somewhat reinventing the wheel here considering plugins like the Full Calendar Scheduler Suite exist but I have not understood how to use it from the documentation and I would like to have a complete understanding before investing in the plugin.

Adjust Time Slot to current date JavaScript
let todayWD = todayDate.getDay();
var TS_wkd_num = field(“JS Wkd Number”); //Using the JS Wkd Number attribute because Toolbox cannot get attributes from Option Sets
var daysDiff = TS_wkd_num - todayWD
var newStartDate = field(“Start (Date)”).setFullYear(Current date/time:extract year,Current date/time:extract month-1,Current date/time:extract date+ daysDiff)

Would love to help you guys polish that English!

That’s my plugin :slight_smile:

If you pay for the plugin, I’ll walk you through it in a zoom meeting.

If you get the free version I’ll do it here :slight_smile:

Your choice friend!

1 Like

Do you have some documentation that I can read through? I’ve tried to trace back how all this works based on the plugin page but have not had much success.

One question, do you end up storing the entire list of potential time slots in the database or do you generate them dynamically?

Hey Jared, I’m Andy,

I am a newbie on calendar setup, was checking out and came across following issue:

if open slot list contains
08:00 - 09:00, 11:00 - 13:00, 15:00 - 20:00

and my appointment length is 2 hours, how to set constraint so it only shows
11:00 - 13:00, 15:00 - 20:00

Is there a way to show only list of time slots / start times that are >= than the appointment length?

Below is the link to my setup

I would filter the Timeslot list for any slot greater than your desired booking duration

Have you tried that yet or are you having issues doing that?

I’ve made similar feature in a couple of projects, but without plugins. DM your email if you’re interested, I’ll add you to contributors to see my way.

Hi jared, I’m having trouble getting around it.

My setup with Calendar Tool is 60-min time interval as follows:

  1. Set weekly Availability from Sun - Sat [Day : text, Start Time : Text, End Time : Text]

  2. Set constraint [this date :extract hour >= Search for Availability 1st item Start Time, and this date :extract hour =< Search for Availability 1st item End Time], but this trick only helps me free time up the first daily time slot that has fully continuous time range.

  3. To integrate booking, I create a new booking with [Date : date, Start Time & End Time : date, Time Range : ], then split the date range into individual date data points, and proceed to add list to booking list of dates (and remove list from available list of dates).

My problem is Available Daily Time Slot RG does not identify appointment time so for 2-hour appointment, the list shows 14:00 (14:00 - 15:00) slot when it should not, as there should be 2-hour deduction from each start time of any booked date.

Not sure how I go about filtering as my booked date coverage is in date data points instead of date range. Can advise how to move forward?

Calendar tool is not my plugin. You should be able to accomplish what you’re trying to do with the time slot generator. I can try to put together some kind of example tonight or tomorrow

I see it’s in ***500 apps currently though so maybe somebody else around here can chime in before I do

Here you go @aqualoop63

How to set up the Time Slot Generator

3 Likes

wow @jared this is a fun and efficient plugin, lovely time range maker too :grinning_face_with_smiling_eyes: and very efficient setup overall.

What I was going for originally is to try display all start time where date range (start time +dynamic period) of a hypothetical event (has not been booked yet so replica RG) doesn’t overlap with already booked event date range. I can see how your plugin quickly hide overlapping date range.

I checked that you have listed similar plugin with paid version, is there any special feature on the paid one?

support and updates :laughing:

1 Like

:grinning_face_with_smiling_eyes: :grinning_face_with_smiling_eyes: hilariously generous, may get it when I build an appointment app.

Thanks again for sharing concepts. Cheers.

1 Like