title: Flatpickr Datepicker has issues with keyboard accessibility and behavior when used inside bootstrap modal
body: <p>Using Flatpickr Datepicker inside Bootstrap modal - focus on tab and selecting dates using keyboard arrow buttons not working anymore.</p>
  
  <p><strong>REPRO LINK</strong>
  <a href="https://jsfiddle.net/pLxhn0d7/" rel="nofollow noreferrer">https://jsfiddle.net/pLxhn0d7/</a></p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>  &lt;div class="modal-dialog"&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;h4 class="modal-title"&gt;Use Datepicker&lt;/h4&gt;
          &lt;button type="button" class="cls close" data-dismiss="modal" aria-hidden="true"&gt;×&lt;/button&gt;
        &lt;/div&gt;
        &lt;div class="modal-body p-4"&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-md-6"&gt;
              &lt;div class="form-group"&gt;
                &lt;label for="ac3" class="control-label"&gt;Select Date&lt;/label&gt;
                &lt;input type="text" id="ac3" name="ac3" class="form-control date" placeholder="Select date" required&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-secondary waves-effect cls" data-dismiss="modal"&gt;Close&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;&lt;!-- /.modal --&gt;
  
  &lt;article&gt;
    &lt;input type="text" placeholder="Select Date.." class=date&gt;
  &lt;/article&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;button  data-toggle="modal" data-target="#acon"&gt;
    Launch Modal
  &lt;/button&gt;
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>const fp = flatpickr(".date", {
  dateFormat:"d-m-Y"
  });
  </code></pre>
  
  <p><strong>Environment details:</strong></p>
  
  <ul>
  <li>Flatpickr version used: 4.5.4 </li>
  <li>Browser name and version: Google Chrome
    79.0.3945.130 (Official Build)</li>
  <li>OS and version: Windows 10 Pro 64-bit</li>
  </ul>