Skip to content
Discussion options

You must be logged in to vote

Was able to get a rough version working.

Filter Code :

export function DateRangeColumnFilter({
    column: { filterValue = [], preFilteredRows, setFilter, id }}) 
  {
    const [min, max] = React.useMemo(() => {
        let min: Date = new Date(preFilteredRows[0].values[id])
        let max: Date = new Date(preFilteredRows[0].values[id])
        preFilteredRows.forEach(row => {
            min = new Date(row.values[id]) <= min ? new Date(row.values[id]) : min
            max = new Date(row.values[id]) >= max ? new Date(row.values[id]) : max
        });
        return [min, max];
    }, [id, preFilteredRows]);
    console.log(min, max)
    return (
        <div
            style={{
       …

Replies: 6 comments 8 replies

Comment options

You must be logged in to vote
4 replies
@anvarazizov
Comment options

@agusismawan
Comment options

@agusismawan
Comment options

@Avi-E-Koenig
Comment options

Answer selected by roxxid
Comment options

You must be logged in to vote
1 reply
@Meez-tech
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Tosinkoa
Comment options

@vareleitor
Comment options

@AsitDixit
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet