I want to filter my repeater base on voucher expire and this voucher expire data was from user input using datepicker. But I just getting problem why my filter code can’t read data from datapicker field on my database, the format read only using date and time meanwhile datepicker value is text, please help if anyone know how to solve this problem.
filter code :
const today = new Date ();
today . toLocaleString ();
// $w(“#datePicker1”).value = today.toLocaleDateString();
wixData . query ( “covid19HealthDeclaration” )
. gt ( “dateField” , today )
. find ()
. then (( results ) => {
//setting all the filtered data to the repeater
$w ( #repeater1 ). data = results . items ;
})
. catch (( err ) => {
let errorMsg = err ;
});
$w ( #repeater1 ). onItemReady (( $w , itemData ) => {
});