Help to call upon list of dates from date/time picker into a dropdown

Hello all,

I’m building a ‘scheduling’ system which allows the user to add the dates of their class (e.g. cooking class). I’ve come up with a fairly rudimentary system which works. The user can select a date (e.g. 31st October @ 5pm) and then repeat this weekly, fortnightly, monthly or just keep it as a one off.

I have a repeating group that displays the results - so if they chose 31st October @ 5pm until 21st November, there would be 4 sessions (31st October, 7th Nov, 14th Nov, 21st Nov). So far so good…

You can see the general layout here (I’ll neaten it up once everything is working). The user clicks ‘Add my schedule’, which brings up a popup and allows the user to select their start date + time, the end date, and the frequency:

Anyway, once a user has entered in this information, they can ‘submit’ the listing. I am saving the calendar dates into my database as Date (list: yes), I’m not sure if this is correct.

Once the user clicks submit, this is how I’m saving the listing (it’s called ActivitySchedule):

As you can see, I’m using ‘set list’, although I’m a bit lost here. Any help at this stage is appreciated

I’m trying to populate a dropdown on the activity page with all the available dates + times. I do want to integrate this into a booking form, but for now I’m just trying to get it to work on the page. I’m not sure how to call upon the dates, but I figured if I did the other bits incorrectly, then I may be a little stuck on this.

Bonus: I have allowed users to set a number of ‘spaces’ for each class. If all the class spaces have sold out for a particular class, I don’t want it to appear in the booking dropdown. If all class spaces have sold out for ALL classes, then I don’t want the class to be visible in the search. Would be great if someone could help/guide me.

Edit link: [Removed]

Thanks to anyone who helps!

1 Like

Just changed my question and content as I managed to work out the previous issue. Super stuck on this one though!

Hi there,

That is pretty complicated, particularly with the “looped” custom events :slight_smile:

So I think the main thing with the structure is that you have your scheduled dates set up as type “date”.

If you want to link the Listing to the Calendar Schedulings, then you need “ActivitySchedule” to have a type of “Calendar Schedule”. and be a list. So that will create the link between the Listing and the list of dates.

Have added a new field for this …

image

You might want to remove “EventName” from Calendar Schedule, it will make things complicated if you ever need to amend the name.

At the moment all the Calendar Schedules are linked to all the Listings, as the Repeating Group picks them all up I think. You could implement this as a Custom State on the page.

Yep you’re right, it is complicated!

I’m facing these 2 issues at the moment:

1. The dates I added to the repeating group are still there when I create a new activity. I’ve tried to reset the group and clear list once I ‘submit’ a class but this doesn’t help (Image of the scheduling group below).

2. I’m not sure how to save and then call up the dates on the booking popup. I’ve been reading up on Custom States (it has been a while since I’ve used Bubble, feeling a bit rusty) and I know I’ve used them in the past, but I’m trying to figure out how I could use one here. (I’m very rusty…).

I’ve moved the dropdown into the booking popup, and I also added an alternative – I used the same repeating group with ‘Select’ buttons to allow the user to select a time instead of through the dropdown. However, the times displayed in the group are not the times I selected for each listing, they seem to all be global (the dates + times for the newest created listing).

Any nudges in the right direction would be much appreciated :smiley:

Edit: On the booking popup, the content for the dates + times in the repeating group is the following: “Current cell’s CalendarScheduling’s StartDate:formatted as …” - I feel like I should have ActivitySchedule2 in there, but I can’t seem to put it in without throwing up an error.

Edit 2: @DaveA - I created my calendar system with the help of your brilliant calendar resources. It was a lot of help! Wonder if you can help shed any further light on my issue above. :slight_smile:

You are saving them to the database, so they will be there until you delete them.

Are they just to calculate the dates ?

Here’s an example use-case:

• A class creator creates a listing and adds their availability through the scheduling system. They submit the listing to the marketplace.

• The class creator can create another listing, and when they add their availability, the repeating group should be blank and should not contain dates from a previous listing.

• Similarly, if another class creator creates a listing, when they add their availability, the repeating group should not contain dates added by other users, again it should be blank.


At the moment, when I add dates to the repeating group, I can see dates from other listings that I’ve created, where as each class has its own schedule, so they every time I create a new listing, the dates repeating group should have a blank slate (like other inputs).


At the moment, when I submit a listing, I have a ‘reset inputs’ which resets all inputs, but the repeating group isn’t reset as I guess it’s not an input, but I can’t seem to reset it by having a ‘reset group’.

Hope that makes sense?

Still working on this, if anyone else has any input that would be great!

This topic was automatically closed after 70 days. New replies are no longer allowed.