Get an array of date values from dataset, and based on the values, filter a date array, to get the ones available

the function:


No errors, but I’m just not sure what is the best way to make this work.

How would you do this feature:

User can choose 2 dates with datepickers (month-day-year).

After that, the repeater should show all the rentals that are available between that time.

At the moment, it is an array of dates, but there also could be start and end dates in different columns, but I don’t know how to implement it to work in the code.

Hope this clarifies.