try fixing date filtering

This commit is contained in:
Collin M. Barrett 2018-06-08 15:28:55 -05:00
parent f6718e9829
commit 32bde976d5

View file

@ -97,12 +97,11 @@ export class Home extends React.Component<RouteComponentProps<{}>, IHomeState> {
Header: "Updated",
accessor: "updatedDate",
filterable: true,
filterMethod: (filter: any, row: any) => row[filter.id].toUpperCase()
.includes(filter.value.toUpperCase()),
filterMethod: (filter: any, row: any) => row[filter.id].includes(filter.value),
sortMethod: (a: any, b: any) => a > b ? 1 : -1,
Cell: (cell: any) => <div>{moment(cell.value).isValid()
? moment(cell.value).format("M-D-YY")
: ""}</div>,
: "N/A"}</div>,
style: { whiteSpace: "inherit" },
width: 75,
headerClassName: "d-none d-sm-block",
@ -112,12 +111,11 @@ export class Home extends React.Component<RouteComponentProps<{}>, IHomeState> {
Header: "Added",
accessor: "addedDate",
filterable: true,
filterMethod: (filter: any, row: any) => row[filter.id].toUpperCase()
.includes(filter.value.toUpperCase()),
filterMethod: (filter: any, row: any) => row[filter.id].includes(filter.value),
sortMethod: (a: any, b: any) => a > b ? 1 : -1,
Cell: (cell: any) => <div>{moment(cell.value).isValid()
? moment(cell.value).format("M-D-YY")
: ""}</div>,
: "N/A"}</div>,
style: { whiteSpace: "inherit" },
width: 75,
headerClassName: "d-none d-sm-block",