T
TanStack2y ago
vicious-gold

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 }); }} />
1 Reply
rising-crimson
rising-crimson2y ago
Do you have a reproduction of your code? How you accomplish this will likely rely on what sort of dataset you have in your table. Also, have you checked the filter and kitchen sink examples?

Did you find this page helpful?