Non-working days - checklist

Hi,

I need a little help with the following situation. After registration for one type of my users (therapists) I let them select a list of non-working days (checklist) in a week, where later in application those non-working days would be presented in the calendar in grey color and the other type of user (patients) cannot access that day to book an appointment.

I apologize in advance if this question was asked before, I searched through the forum but I couldn’t find it.

Thank you in advance for any help.

Best regards,

when the user selects a list of days on registration, you can save that list of dates onto the User data type.

When you want to display the list of dates as days in a week, you can create a recursive workflow that:

  • takes in the original lists of dates as a parameter.
  • generates a new date for each date in your list, that is exactly 7 days away from the current date.
    - Adds the new date to a new or existing list of dates
  • iterates through your list of dates and repeats this action for each date.
  • returns a new list of dates that includes the same dates, but for the next week.

You can choose to then schedule this exact action on a recurring basis each week, or recursively schedule the above workflow in one event, so you generate the same days for the next 52 weeks (or however long you want).

You’ll have to keep performance in mind though :slight_smile: wouldn’t want the user to wait too long as you’re generating all of their available dates into the future.

Thank you Danny for the answer. I didn’t mean a list of days in terms of dates, I meant selecting a couple of days in a week as non-working for example, the therapist selected Monday, Friday, and Sunday as a non-working day. These three days should for whatever date be highlighted as grey and not clickable.
I am a beginner in bubble.io, so should I apply the same advice that you gave me above for user data type?

Thank you

ah, there are calendar plugins that have this built-in I believe. It’ll be a much simpler way to do this.

Here’s one: Full Calendar Scheduler Suite Plugin | Bubble

And here’s the thread I found for it: How to Block Off Day of the Week in Calendar - #5 by jared.gibb

It’s by @jared.gibb . Looks like there’s no external dependencies either :slight_smile:

2 Likes

Awesome! You are the best, thank you!