asb_cloud_front/src/components/Table/DatePickerWrapper.jsx

13 lines
347 B
React
Raw Normal View History

import { DatePicker } from "antd"
import moment from "moment"
import {formatDate} from './index'
export const DatePickerWrapper = ({value, onChange, ...other}) => (<DatePicker
allowClear={false}
defaultValue={moment()}
value={moment.utc(value).local()}
format={formatDate}
showTime
onChange={(date) => onChange(date)}
{...other}
/>)