Date picker on data-table #589
Replies: 3 comments
-
I'm trying to implement it |
Beta Was this translation helpful? Give feedback.
-
I've got it. If you get the Taskt as example : https://github.com/shadcn-ui/ui/tree/main/apps/www/app/examples/tasks In column definition: https://github.com/shadcn-ui/ui/blob/main/apps/www/app/examples/tasks/components/columns.tsx Just add filterFn with it. Dont forget add column in toolbar component Here I leave you and example of my code, I'm using date-fns to compare dates. Maybe it's not the best way to get it, but it is working. |
Beta Was this translation helpful? Give feedback.
-
just ran into this because I want to impelemt something similar where I have the calendar at the top of the page maybe as a popup then select a date and filter the results on the data table also while having the default set to Today(). I have a data table set up with dates and custom time components I built but that is the only thing I am missing. do you have a live example I could look at? |
Beta Was this translation helpful? Give feedback.
-
Has anyone tried to add the Date-Picker as an option for filtering data on data-table
Beta Was this translation helpful? Give feedback.
All reactions