title: jQuery: Remove error after autocomplete happens in a field
body: <p>I'm using the <code>Daterangepicker</code> for <code>Bootstrap</code> on my only input text field on my page.  When I leave the input text field blank, the error springs up, which is what I want.   However, when I fill in the input text field using the <code>Daterangepicker</code>, the error persists. </p>
  
  <p><a href="https://i.stack.imgur.com/4eqcs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4eqcs.png" alt="enter image description here"></a></p>
  
  <p>I'd like it to be removed.  The error text removes itself when I click the Begin button, but I want the error text to remove itself once text is populated in the input field.   </p>
  
  <p>Here's my code:  </p>
  
  <pre><code>$('#beginBtn').on('click', function() {     
    //Validation of Open Enrollment input
    var autocd = $('#autocd').val();
    if(autocd == "") {
      $('#autocderror').text('Cannot be blank').css({'color': 'red'});
      return false;
    } else if (autocd != "") {
      $('#autocderror').fadeOut(1000);
    }
  
    var startDate = $("input[name='daterangepicker_start']").val();
    var endDate = $("input[name='daterangepicker_end']").val();
  
    //console.log(startDate + " thru " + endDate);
  
    $.post('api/countdownprocess.php', {startDate:startDate, endDate:endDate}, function(data) {
      if(data == 'Successful'){
        $('#oerestext').html(data).css({'color': 'green'}).fadeOut(3000);
        setTimeout(function() {
          location.reload();
        }, 5000);
      } else {
        $('#oerestext').html(data).css({'color': 'red'}).fadeOut(3000);
      }
    });// end of Begin Button
  </code></pre>
  
  <p>The input field is called autocd.  How do I do that?  Is there a way to get autocomplete as a selector?  </p>