title: React Datepicker - inline style doesn't work
body: <p>I'm triggering onBlur javascript function to turn the border of inputs red if the entry is invalid.</p>
  <p>This is working fine except for Datepicker.</p>
  <p>I can style its border using classname but I need to use inline style to make it change depending on what is input. How can I do this?</p>
  <p>My code:</p>
  <pre><code>state= {
      borderColors:{
          startDetails: 'none',
      }
  }
  
  borderColor = (e, field) =&gt; {
      e.preventDefault()
      let borderColors = this.state.borderColors
      e.target.value === '' ? borderColors[field] = 'tomato' : borderColors[field] = '#00988f'
      this.setState({borderColors})
  }
  
  
  
    &lt;DatePicker
       className=&quot;datePicker&quot;
       timeIntervals={15}
       selected={values.startDetails}
       onBlur = {event =&gt; this.borderColor(event, 'startDetails')}
       onChange={(event) =&gt; this.props.changeField(event, &quot;startDetails&quot;)}
       showTimeSelect
       dateFormat=&quot;d MMM yyyy HH:mm&quot;
       required
       placeholderText={'Date &amp; Time Event Starts'}
       style={{borderColor: this.state.borderColors.startDetails}}
       /&gt;
  </code></pre>