From 6eac336dcbd61b9767e08f6d94bd688f7b8ca271 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Fri, 8 Jun 2018 15:28:55 -0500 Subject: [PATCH] try fixing date filtering --- src/FilterLists.Web/ClientApp/components/Home.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/FilterLists.Web/ClientApp/components/Home.tsx b/src/FilterLists.Web/ClientApp/components/Home.tsx index 816dfdc50..7548bbfd7 100644 --- a/src/FilterLists.Web/ClientApp/components/Home.tsx +++ b/src/FilterLists.Web/ClientApp/components/Home.tsx @@ -97,12 +97,11 @@ export class Home extends React.Component, 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) =>
{moment(cell.value).isValid() ? moment(cell.value).format("M-D-YY") - : ""}
, + : "N/A"}, style: { whiteSpace: "inherit" }, width: 75, headerClassName: "d-none d-sm-block", @@ -112,12 +111,11 @@ export class Home extends React.Component, 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) =>
{moment(cell.value).isValid() ? moment(cell.value).format("M-D-YY") - : ""}
, + : "N/A"}, style: { whiteSpace: "inherit" }, width: 75, headerClassName: "d-none d-sm-block",