Performing arithmetic on a date range

I want to display a date range (availability) to the user within a date picker (if possible). There will be some days/dates within the date range that we don’t want to be selectable by the user.

So, we have some blocked days/dates stored in the database. I want to subtract those days or filter them out and display the date range without the user being able to select those blocked out days/dates within the date range.

I can’t find an option to do this within Bubble. Is there a simple solution?

Thank you

You’ll have to create each day of booked day separately If the user selects the date range from 01/01/2023 - 01/14/2023. Your backend should create 14 rows that will contain these days.

or you can use custom js, like Day JS lib, to parse each day from the date range and set parsed days into a custom state, and assign them to the calendar

calendar grid pro

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