title: React Datepicker( can't get value of input)
body: <p>I am new in react. I need use <a href="https://github.com/Hacker0x01/react-datepicker" rel="noreferrer">react-datepicker</a></p>
  
  <p>I want to get value of input, when I change date.
  If i click on 20th October 2017, i want put 20th October 2017 in my variable.
  But the main problem that I should work with component, not with input.</p>
  
  <p>Before I just took value from state. Like this.state.value. But right now it is object(Moment) in state. And this object doesn't have value field. </p>
  
  <p>There is my code:</p>
  
  <pre><code>export default class DatePicker extends Component {
  constructor (props) {
      super(props);
      // this.props.date should looks like "29 November 2017 00:00"
      // second argument for moment() it is format of date, because RFC 2822 date time format
      this.state = {
          date: moment(this.props.value, 'LLL')
      };
  }
  handleChange = (date) =&gt; {
    // const valueOfInput = this.state.date  &lt;--- I want string with date here
    console.log('this.state.date',this.state.date);
    this.setState({date: date});
  };
  render() {
      return &lt;Form.Field&gt;
                &lt;Label&gt;
                  &lt;Picker
                    selected={this.state.date}
                    onChange={this.handleChange}
                    dateFormat="LLL"
                    locale={this.props.language}
                  /&gt;
                &lt;/Label&gt;
            &lt;/Form.Field&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/T3lRi.png" rel="noreferrer"><img src="https://i.stack.imgur.com/T3lRi.png" alt="enter image description here"></a> </p>