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