Hi
I have a filtered collected data set on a dynamic page. It is for an events site and the events are sorted by date. However I want to remove events that have expired from showing on the list
Here is my code which is working fine just need to remove older entries.
My database/collection has the datefield in it
// Velo API Reference: https://www.wix.com/velo/reference/api-overview/introduction
/**
* Adds an event handler that runs when the element is clicked.
[Read more](https://www.wix.com/corvid/reference/$w.ClickableMixin.html#onClick)
* @param {$w.MouseEvent} event
*/
import wixData from 'wix-data';
$w("#text44").hide();
export function searchButton_click(event) {
search();
}
function search(){
wixData.query("Exhibition")
.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();}
})
}
any help welcomed