From 4afa7810ff25ae1b82819bc5b19475fa37700402 Mon Sep 17 00:00:00 2001 From: goodm2ice Date: Mon, 13 Dec 2021 10:19:57 +0500 Subject: [PATCH] =?UTF-8?q?DatePickerWrapper=20=D0=BF=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=20=D0=BD=D0=B0=20TSX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Table/DatePickerWrapper.jsx | 13 ------------ src/components/Table/DatePickerWrapper.tsx | 23 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 13 deletions(-) delete mode 100644 src/components/Table/DatePickerWrapper.jsx create mode 100644 src/components/Table/DatePickerWrapper.tsx diff --git a/src/components/Table/DatePickerWrapper.jsx b/src/components/Table/DatePickerWrapper.jsx deleted file mode 100644 index a09390b..0000000 --- a/src/components/Table/DatePickerWrapper.jsx +++ /dev/null @@ -1,13 +0,0 @@ -import { DatePicker } from "antd" -import moment from "moment" -import {formatDate} from './index' - -export const DatePickerWrapper = ({value, onChange, ...other}) => ( onChange(date)} - {...other} -/>) \ No newline at end of file diff --git a/src/components/Table/DatePickerWrapper.tsx b/src/components/Table/DatePickerWrapper.tsx new file mode 100644 index 0000000..f042a4a --- /dev/null +++ b/src/components/Table/DatePickerWrapper.tsx @@ -0,0 +1,23 @@ +import { DatePicker } from 'antd' +import moment from 'moment' +import { formatDate } from './index' + +export type DatePickerWrapperProps = { + value: moment.Moment, + onChange: (date: moment.Moment | null) => any + [other: string]: any +} + +export const DatePickerWrapper: React.FC = ({value, onChange, ...other}) => ( + onChange(date)} + {...other} + /> +) + +export default DatePickerWrapper