# filter dataset based on date picker

**URL:** <https://forum.wixstudio.com/t/filter-dataset-based-on-date-picker/33356>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [October 23, 2022, 8:32pm UTC](https://forum.wixstudio.com/t/filter-dataset-based-on-date-picker/33356 "2022-10-23T20:32:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![t\_zone1000](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@t\_zone1000](https://forum.wixstudio.com/u/t_zone1000)\
**Post date:** [October 23, 2022, 8:32pm UTC](https://forum.wixstudio.com/t/filter-dataset-based-on-date-picker/33356/1 "2022-10-23T20:32:35Z")

</div>

Hi I am trying to set up an events page that will filter results based on three drop down fields. Genre, Location and Date  
The Genre and location are fine and working.  
However the date picker I am finding hard

In the datebase there are two fields start date and end date  
lets say one event as a start date of 25.10.22 and end date 28.10.22

One the user end if a user selects from date picker 27.10.22 I need that entry to show up  
also needs like the other three to be optional  
This is the code I have but it is not working I know its something to do with the between() bit dont know the exact syntax

$w(“#text44”).hide(); let today = new Date() // let sToday = new Date().toISOString().split(‘T’)[0]; $w.onReady(function () { $w(“#eventsDataset”).onReady(() =\> { let sToday = new Date(); $w(“#eventdDataset”).setFilter(wixData.filter().ge(“date”, sToday)); }); }); export function searchButton\_click(event) { search(); } function search(){ wixData.query(“Exhibition”).ge(“date”, today) .contains(“arraystring”, String($w(‘#dropdown1’).value)) .and(wixData.query(“Exhibition”).contains(“showstring”, String($w(‘#dropdown2’).value))) .find() .then(results =\> { $w(‘#listRepeater’).data = results.items ; if($w(‘#listRepeater’).data.length ===0){ $w(“#text44”).show(); } else { $w(“#text44”).hide(); } }) }

This is an image of the front end

![](https://us1.discourse-cdn.com/wix/original/3X/2/b/2bae8a956f9533b8dd0e4ef6c32e3d845b723004.png)

I am stuck with this and cant find much online so any help welcomed
