import React from 'react';
import { DatePicker } from 'antd'
import moment from 'moment';
moment.locale('zh_CN');
import locale from 'antd/es/date-picker/locale/zh_CN';

const { RangePicker } = DatePicker;

interface Props {
  handleChange: (value: string[]) => void
}

const AntdDatePicker = (props: Props) => {

  const handleChange = (data: any, dateString: string[]) => {
    props.handleChange(dateString)
  }

  return (
    <div>
      <RangePicker onChange={handleChange} locale={locale} />
    </div>
  )
}

export default AntdDatePicker;
