How to create a list of dates based on specific days of the week in a range of dates?

Hey, fellow Bubblers!

How would you go about creating a functionality like this?

  • A user can select a range of dates
  • They can also specify multiple days of the week
  • Return the dates within that range that meet the specifications of the day of the week.

Not sure if that made sense so here’s an example I’m thinking of:

  • I select a date range of Jan 1st, 2023 - Feb 28th, 2023
  • I also want Tuesdays and Thursdays

What would the best way be to go about returning every date that lies on Tuesdays and Thursdays all within Jan 1st, 2023 - Feb 28th, 2023?

You have to go old fashioned and build the calendar yourself for more flexibility.
But you can try to see what the plugins offer.