import { DatePicker as OriginalDatePicker } from 'antd';
import { withMomentProps } from "../../utils/hoc";
import dayjs from 'dayjs';
import { RangePicker, OldPisellDateRangePicker } from "@pisell/date-picker";
import localeData from 'dayjs/plugin/localeData';
import weekday from 'dayjs/plugin/weekday';
dayjs.extend(weekday);
dayjs.extend(localeData);

// const OriginalRangePicker = OriginalDatePicker.RangePicker;

var DatePicker = withMomentProps(OriginalDatePicker, ['defaultPickerValue', 'defaultValue', 'showTime.defaultValue', 'value']);

// const RangePicker = withMomentProps(OriginalRangePicker, [
//   'defaultPickerValue',
//   'defaultValue',
//   'showTime.defaultValue',
//   'value',
// ]);

DatePicker.RangePicker = RangePicker;
DatePicker.OldRangePicker = OldPisellDateRangePicker;
export default DatePicker;