Hi, I have a listing website similar to Airbnb, and I want users to be able to search by location and availability. I currently have the unavailable/booked dates stored as a list of dates in the data type Calendar, and each Calendar entry is associated with a Site.
I have set up a repeating group to show the sites that match the search criteria of location and availability. However, I can’t specify a list of dates to be excluded in the data source. I can’t use the :filter function as it is too slow, but in the constraints I can only select 1 date to be matched against the list of dates in the database.
For example, if the dates 27 March and 28 March were booked, but a user searched for availability from 26-29 March, I would need it to recognise that the dates in the middle of the desired stay are not available, so the site should not show up in search.
From reading other topics, I think this would work if I was using date ranges rather than a list, as I could use the “overlap” function, but unfortunately date ranges don’t work with the calendar that I am using.
Does anybody know if it’s possible to solve this using a list of dates in the database structure?