How to show planned workouts based on selected date in calendar?

I have workouts planned on specific dates and I want to show the planned workout when a user selects a day in the calendar.

I can display the calendar correctly and I have a list of workouts, but I can’t figure out how to connect the two. I don’t see any clear option to filter or link the workout list based on the date selected in the calendar.

What I want:

  • User selects a date in the agenda/calendar

  • The workout(s) planned for that specific date are shown below

  • Preferably on the same screen

Is there a best practice in Adalo to:

Pass the selected date from the calendar

Or filter a workout list based on the selected calendar day?

Any guidance or example setup would be greatly appreciated.

Hey @Roelt, welcome to the community :waving_hand:

If you’d like workouts to be filtered based on a specific date clicked on the calendar, you can activate the (Agenda View) mode on the built-in Calendar component.

If you prefer a more practical and customized way, especially if you’d like to display workouts on another list as shown in your screenshot, you can either:

  • Replace the calendar by a (Date picket) component, where you can filter the list based on it.
  • Or use the (Advanced Calendar) component from the Marketplace, were it has more features and is more practical for filtering and logic.

Tag me for a cloneable calendar + filtered workouts example.

Ali Bazzi
webnux.org | consultation.webnux.org

Hi @Ali-Bazzi ,

Thank you for your response. I would really appreciate if you could send me some examples to find out what works best for me.

Thank you in advance!

Hey @Roelt,

You’re very welcome! Sure, please let me know what approach from the ones I’ve mentioned previously you prefer, and I’d be happy to share an example of it with you for sure.

Hi,

I really like this view of the calendar so I would like to use this one. Any tips on how to implement it most sufficient?

Thank you for your advice!

@Roelt, check this video out which might help you! : https://drive.google.com/file/d/1cZJQXOXlldbAO3PeYju1YEM4rtXh-_Y_/view?usp=sharing (Recorded by NoCode Monkey team)

Thank you and have a great day!

Hey @Roelt, you’re welcome!

Sure, It’s very easy, you can follow these steps:

  • Add the Advanced Calendar component in the screen above the list.

  • Select the (Workouts) collection in the Calendar, and connect the Start time (Workout Time), and End time (if available) to your database collection properties.

  • Add the following filters to the list of (Workouts) below:

    Filter 1: Workout Time is after (Start of day selected on the Advanced Calendar).

    AND, Filter 2: Workout Time is before (End of day selected on the Advanced Calendar).

Note: Make sure to have the (Workout time) property in the database as a date/time property.

Thank you for the help! It worked!

You’re welcome! I’m glad it worked.

Let me know if you face any difficulties, and good luck with the app!

Hey,

I noticed that sometimes after selecting several dates the date suddenly jumps back to the current date. Do you have solutions for this? @Ali-Bazzi

Hey @Roelt, just to confirm, it jumps back to default automatically on when you try to select a specific date?

It jumps back to the default after selecting several dates.
So when clicking through the calendar it suddenly jumps back when you select an other date.

I also see that it shows dots beneath dates that have no workout.

Is it possible please to share a preview link, so I can check it directly? This way we can see if the behavior is from the flow or the component itself.

Sure!

This is the preview link:

Thank you @Roelt for sharing the preview link. I tested it and it’s changing the date automatically after each click. This component didn’t have this issue before. Let’s try one thing, please remove the section (default date) from the calendar’s parameters and let me know if it still occurs.

@Ali-Bazzi I have tried it, but it is still there.
However this is of course not the end of the world. Just some minor detail.

Thanks for helping.

You’re welcome! I recommend contacting the developer of the component in case it’s an issue with the component itself. You can find their contact info at the bottom of the component’s parameters.

Hi @Roelt,

What happens if you turn off this toggle in the component settings?

image

Thank you and have a great day!

1 Like

That works! But I still want to show the the default date, so I have made a ticket for the developer.
Thank you for this tip.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.