Date range filter
How can i filter the table so that it uses a date range? I've tried to use a bunch of the resources online but I cant figure it out: <DatePickerWithRange
onChange={(dateRange) => {
console.log(dateRange);
const { from, to } = dateRange;
const fromDate = from ? new Date(from) : undefined;
const toDate = to ? new Date(to) : undefined;
console.log(fromDate, toDate);
table.getColumn("REPORT_DATE")?.setFilterValue({ from: fromDate, to: toDate });
}}
/>
onChange={(dateRange) => {
console.log(dateRange);
const { from, to } = dateRange;
const fromDate = from ? new Date(from) : undefined;
const toDate = to ? new Date(to) : undefined;
console.log(fromDate, toDate);
table.getColumn("REPORT_DATE")?.setFilterValue({ from: fromDate, to: toDate });
}}
/>