Repeating Group show certain dates

I have a repeating group showing slots booked but I need it to be limited to the month.

E.g when “September” is clicked, it shows the repeating group will all booked slots in September.
When “October” is clicked, it shows another repeating group with all booked slots in October.

Right now it’s all fine except it’s showing me September and October together.

How can I limit the repeating group to only show calendar events in September?


Do a search for events

startTime >= Arbitrary date (September 1st 12:00am)
startTime < Arbitrary date (October 1st 12:00am)

This returns all events where start time is in September.

From my “it’s nothing to be proud of, but it’ll work” box of coding ideas, try this.

On your page, set 2 custom states of type date: start_date and end_date.

I assume you have a dropdown where the user can select the month. Add a workflow to the dropdown when it’s changed. This workflow will set the values to start_date and end_date to the start and end date of the selected month. The screenshot below shows what it will do if the user selected “June” or “September”. You’ll just add additional code for the other months but you only need one to set the end_date:

You can then automatically use the values of start_date and end_date as part of your search criteria, like this:

Here is what the results are when I choose “September”:

I assume you don’t need to worry about times. If you do, you will need to replace the hours, minutes and seconds with zero in your start_date and end_date values, otherwise you won’t get complete search results.

Hope this helps.

Sorry I should have said, I’m trying to capture all events in the current month. Because when it’s October the months name will automatically change to October

Do a search for events

startTime >= Current date/time:rounded down to month

startTime < Current date/time:rounded down to month +months (1)

Thank you! Works perfectly!

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