Browse Source

FIX | FIX filter birthdates

fix/filter_date
Yevhen Romanenko 3 years ago
parent
commit
0fb83712ba
  1. 5
      src/components/TableGrid/Table.tsx
  2. 2
      src/containers/ContactsUsers/configs/columns.config.tsx

5
src/components/TableGrid/Table.tsx

@ -7,6 +7,7 @@ import { Input, Spin, Pagination, Select } from "antd"; @@ -7,6 +7,7 @@ import { Input, Spin, Pagination, Select } from "antd";
import { EUserStatus, IColumn, IIps, IPListType } from "@/shared";
import { ActionBottomBar } from "./components";
import { voidColumn, VOID_COLUMN_KEY } from "./configs";
import moment from "moment";
interface IProps {
tableName: string;
@ -164,7 +165,9 @@ export const Table = ({ @@ -164,7 +165,9 @@ export const Table = ({
[e.target.name]: e.target.value,
});
paginationList.setLoadParams({
[e.target.name]: new Date(e.target.value),
[e.target.name]: moment(
new Date(e.target.value)
).format("MM DD YYYY"),
});
}}
value={tableFilter[item.column.key]}

2
src/containers/ContactsUsers/configs/columns.config.tsx

@ -153,7 +153,7 @@ export const columnsConfig: any = [ @@ -153,7 +153,7 @@ export const columnsConfig: any = [
resizable: true,
sortable: true,
filter: true,
filterType: "search",
filterType: "datePicker",
formatter: ({ row }) => {
return (
<span className="column-with-secondary-txt ">

Loading…
Cancel
Save