title: onChange event for React child component to update state
body: <p>I'm trying to learn how to implement a React form (ES6 syntax) and pass the onChange events for each field up to a controller parent component which is responsible for updating the state. This works fine for standard html elements, however I am trying a pre-canned Datepicker (<a href="https://www.npmjs.com/package/react-bootstrap-date-picker" rel="noreferrer">https://www.npmjs.com/package/react-bootstrap-date-picker</a>) for a date field and can't readily pass the event back up to the parent in the same way. Is there a simple way to address this?</p>
  
  <p><strong>Controller Component</strong></p>
  
  <pre><code>   class Parent extends React.Component {
      constructor (props) {
          super(props);
          this.state = {job: ''} 
      }
  
      setJobState(event) {
          var field = event.target.name;
          var value = event.target.value;
          this.state.job[field] = value;
          this.setState({job: this.state.job});
      }
  
  
      render () {
          return &lt;Child onChange={this.setJobState.bind(this)} /&gt;
      }
  }
  </code></pre>
  
  <p><strong>Child Component</strong></p>
  
  <pre><code>class Child extends React.Component {
      constructor (props) {
          super(props);
  
      }
  
      render () {
          &lt;form&gt;
           &lt;input type="text" name="jobNumber" onChange={this.props.onChange} /&gt; 
           &lt;DatePicker name="dateCmmenced" onChange={this.props.onChange}  /&gt;
          &lt;/form&gt;
      }
  }
  </code></pre>