import { memo } from 'react' import { DatePicker, } from 'antd' import moment, { Moment } from 'moment' import { RangeValue } from 'rc-picker/lib/interface' import { RangePickerSharedProps } from 'rc-picker/lib/RangePicker' import { defaultFormat } from '@utils' const { RangePicker } = DatePicker export type DateRangeWrapperProps = RangePickerSharedProps & { value?: RangeValue, isUTC?: boolean } const normalizeDates = (value?: RangeValue, isUTC?: boolean): RangeValue => { if (!value) return [null, null] return [ value[0] ? (isUTC ? moment.utc(value[0]).local() : moment(value[0])) : null, value[1] ? (isUTC ? moment.utc(value[1]).local() : moment(value[1])) : null, ] } export const DateRangeWrapper = memo(({ value, isUTC, ...other }) => ( )) export default DateRangeWrapper