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) => { });
this code can't read this field value
this is very urgent to me :"(, thanks if anyone willing to help me
my code only read this date format
This is my properties
Thank you for responding, yes I've make sure the field name has been correct
Sure that your FIELD-ID is --> "dateField" and not something like --> "voucherExpire" ???
Also use CONSOLE to investigate and analy your own code....
const today=new Date(); console.log(today); const todayLocal = today.toLocaleString(); console.log(todayLocal);