TanStackT
TanStack2y ago
1 reply
cold-orange

Filter not working properly

Hello, So i'm trying to filter a date, but the problem is, the date is a string and not an actual date (image sample)

the main question I want to ask is, is there any possible way that I can get the value and convert it to a date before passing it to the DataTableColumnHeader (from shadcn) ?
  {
    accessorKey: "dateOfEvent",
    header: ({ column }) => {
     
      return (
        <DataTableColumnHeader column={column} title="Event Date" />
      )
    },
  },
image.png
Was this page helpful?