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}
/>)