title: State not set on button press 1st time
body: <p><code>Else if</code> Condition not give response on 1st click button, it always give response 2nd click on button.
  I'm trying get <code>date diff between two date</code>, minimum date to maximum date.</p>
  
  <p>Date came every click according to selected date, but maxDate &amp; minDate not set in state. </p>
  
  <p>After 2nd click first date set in minDate, 3rd click set 2nd date as maxDate. 
  But i want set date as well as click on button.</p>
  
  <pre><code>this.onDayPress = this.selecionarData.bind(this);
  
  selecionarData(date){
  let {year, month, day} = date;
   if (this.state.minDate &amp;&amp; this.state.maxDate) {
        if (this.state.minDate &gt; day) {
          this.setState({
            minDate: day
          });
        } else {
          this.setState({
            maxDate: day
          });
        }
      } else if (this.state.minDate &amp;&amp; this.state.maxDate === undefined) {
        if (this.state.minDate &gt; day) {
          this.setState({
            minDate: day,
            maxDate: this.state.minDate
          });
        } else {
          this.setState({
            maxDate: day
          })
        }
      } else {
        this.setState({
          minDate: day
        });
      }
  </code></pre>