title: can't pick date again in datepicker modal after swal fire alert
body: <p>My HTML:</p>
  <pre><code>&lt;input type=&quot;text&quot; id=&quot;start&quot; class=&quot;form-control&quot; value=&quot;&quot;&gt;
  &lt;input type=&quot;text&quot; id=&quot;end&quot; class=&quot;form-control&quot; value=&quot;&quot;&gt;
  &lt;input type=&quot;text&quot; id=&quot;pay&quot; class=&quot;form-control&quot; value=&quot;&quot;&gt;
  </code></pre>
  <p>My JS:</p>
  <pre><code>$(document).ready(function () {
      $(&quot;#start,#end&quot;).bootstrapMaterialDatePicker({
  
          startView: &quot;days&quot;,
          autoclose: true,
          format: &quot;DD MMMM YYYY&quot;, 
          weekStart: 0, 
          time: false,    
      });
  
      $(&quot;#end&quot;).change(function () {
      var startDate = document.getElementById(&quot;start&quot;).value;
      var endDate = document.getElementById(&quot;end&quot;).value;
   
      if ((Date.parse(endDate) &lt;= Date.parse(startDate))) {
          // alert(&quot;End date should be greater than Start date&quot;); //default alert
           $('#end').modal('toggle'); //hide modal when end date is smaller than start date
          Swal.fire({                 //trigger the swal alert
  
              icon: 'error',
  
              title: 'Validation',
  
              text: 'End date should be greater than Start date',
  
  
          });
          $('#end').modal('show'); //after alert, input the end date again (not working)
          document.getElementById(&quot;end&quot;).value = &quot;&quot;;
      }
      });
  }
  </code></pre>
  <p>Screenshot:</p>
  <p><a href="https://i.stack.imgur.com/LkUrw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LkUrw.png" alt="enter image description here" /></a></p>
  <p>The validation process worked, but when I clicked OK, the alert didn't immediately close, and I can't select the date in datepicker modal again.</p>
  <p><a href="https://i.stack.imgur.com/TVxAm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TVxAm.png" alt="enter image description here" /></a></p>
  <p>I tried <code>$('#end').modal('toggle');</code> and <code>$('#end').modal('show');</code> but it's not working.</p>
  <p>Question:
  How can I hide the alert modal, and select the date again?</p>
  <p>Any help would be appreciated.</p>