title: How to disable <react-date-picker> component on a button click
body: <p>I have used a date picker component from <strong><code>react-date-picker</code></strong>. I need to disable the entire date control and the button itself on a single button click. The button does get disabled but the <strong>DatePicker</strong> component doesn't. I have tried the following but didn't work. Is there a correct way to do it? </p>
  
  <pre><code>import DatePicker from 'react-date-picker';
  ...
  ...
  this.state = {
    disabledDate: false
  }
      ...
      ...
      ...
  
    noDateRememberButtonClick() {
      this.setState({
        disabledDate: true
      });
    }
  
      render() {
             return(
          &lt;div className="wrapper"&gt;
            &lt;div className="date-picker"&gt;
              &lt;DatePicker
                onChange={this.dateOnChange}
                value={this.state.boughtDate}
                disabled={this.state.disabledDate} /&gt;
            &lt;/div&gt;
            &lt;button className="btn" onClick={this.noDateRememberButtonClick} disabled={this.state.disabledDate} type="button"&gt; {BUTTON_LABEL}&lt;/button&gt;
          &lt;/div&gt;
  
  )}
  </code></pre>