Setting up date picker to support searching for events across a date range

I’ve got a list of events and I’m trying to enable a vistor to select a date range via the date picker and then surface the events that fall within that range. Haven’t found a way to accomplish this. Any help would be greatly appreciated!

Thank you!

Hi,

Add two date pickers, one for min date and the other for max date.
Then pass their selected date values to the wixDataQuery gt() and lt() functions.

for example:

const minDate = $w("#startDate").value
const maxDate = $w("#endDate").value
wixData.query("collectioname").lt(minDate).gt(maxDate).find()

I’ll give it a shot, Thank you!