import React from 'react';
import { WeaDatePicker } from "ecCom";
import "./index.less"

export default class MonthRange extends React.Component {
    render() {
        return <div className="monthRange">
        <span className="labelName">{this.props.label}:</span>
        <WeaDatePicker
            format="yyyy-MM"
            value={this.props.startDate}
            onChange={value => this.props.onStartDateChange(value)}
        />
        <span className="between"> 至 </span>
        <WeaDatePicker
            format="yyyy-MM"
            value={this.props.endDate}
            onChange={value => this.props.onEndDateChange(value)}
        />
      </div>
    }
}
