import { DatePicker } from 'antd';
import React, { useState } from 'react';
import {DatePickerProps} from 'antd/es/date-picker/interface';
import moment, {Moment} from 'moment';

import locale from 'antd/es/date-picker/locale/zh_CN';
import 'moment/locale/zh-cn';
moment.locale('zh-cn');

const { MonthPicker } = DatePicker;

export default  React.forwardRef((props:DatePickerProps,ref)=> {
    return (
        <MonthPicker
        allowClear={true}
          locale={locale}
        {...props}
        />
      );
  });