import React from 'react'; import ReactDOM from 'react-dom'; import {Input,DatePicker} from 'antd'; import 'antd/dist/antd.css'; import locale from 'antd/lib/date-picker/locale/zh_CN'; import 'moment/locale/zh-cn'; import moment from 'moment'; moment.locale('zh-cn'); const { RangePicker } = DatePicker; class InputCom extends React.Component{ constructor(props) { super(props); } rangePickerChange = e =>{ console.log("rangePickerChange:",e); } render(){ return( <div> <RangePicker fromat="YYYY-MM-DD HH:mm:ss" placeholder={['开始时间','结束时间']} showTime={{ hideDisableOptions:true }} locale={locale} onChange={this.rangePickerChange} /> </div> ) } } export default InputCom;