Add two date picker elements to your Wix site and then add the following code to a trigger event: var startDate = $w('#datePicker1').value; const endDate = $w('#datePicker2').value; var filteredResults = []; wixData.query('Admin') .find() .then(results => { let items = results.items; console.log(items); if (items.length > 0) { filteredResults = items.filter(item => { const itemDate = new Date(item.dateOfCheck); const startFilterDate = new Date(startDate); const endFilterDate = new Date(endDate); return itemDate >= startFilterDate && itemDate <= endFilterDate; }); console.log(filteredResults); $w('#repeater1').data = filteredResults; } }) .catch(error => { console.error('Error fetching data:', error); });
The dateOfCheck is the value which is coming from your database. The search function checks all the items and retrieves them if they fall under user given date range.