import React from 'react';
import { DatePicker } from 'antd';

const { RangePicker: ARangePicker } = DatePicker;

export default function RangePicker(props) {
  const { currentVal, itemProps = {} } = props;

  let compoProps = {
    ...itemProps,
    value: currentVal,
    onChange: date => props.onChange(date),
  };

  return <ARangePicker {...compoProps} />;
}
