title: Bootstrap 5 modal won't dismiss
body: <p>All my modal forms are working fine. But here's one I ported from Bootstrap 4 to Bootstrap 5 and it won't close. The Close button (the X at the top of the popup) won't close the modal. And the Cancel button won't close the modal.</p>
  <p>I updated <code>data-dismiss</code> to <code>data-bs-dismiss</code>. I don't know what else I'm missing. There are no JavaScript errors.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('#open-modal').on('click', function() {
    var $modal = $('#date-filter-modal');
    $modal.show();
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous"&gt;
  
  &lt;button id="open-modal" type="button" class="btn btn-primary"&gt;Open Modal&lt;/button&gt;
  
  &lt;div id="date-filter-modal" class="modal" tabindex="-1" role="dialog"&gt;
    &lt;form method="get"&gt;
      &lt;input type="hidden" name="ftype" /&gt;
      &lt;input type="hidden" name="fid" /&gt;
      &lt;div class="modal-dialog" role="document"&gt;
        &lt;div class="modal-content"&gt;
          &lt;div class="modal-header"&gt;
            &lt;h5 class="modal-title"&gt;&lt;/h5&gt;
            &lt;button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"&gt;&lt;/button&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
            &lt;div class="row"&gt;
              &lt;div class="col-md-6"&gt;
                &lt;div class="form-group"&gt;
                  &lt;label class="control-label"&gt;Start Date&lt;/label&gt;
                  &lt;input class="form-control start-date" type="date" /&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="col-md-6"&gt;
                &lt;div class="form-group"&gt;
                  &lt;label class="control-label"&gt;End Date&lt;/label&gt;
                  &lt;input class="form-control end-date" type="date" /&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="modal-footer d-flex justify-content-between"&gt;
            &lt;div&gt;
              &lt;button type="button" class="clear-date-filter btn btn-danger"&gt;Clear&lt;/button&gt;
            &lt;/div&gt;
            &lt;div&gt;
              &lt;button type="submit" class="btn btn-success"&gt;Set Filter&lt;/button&gt;
              &lt;button type="button" class="btn btn-secondary" data-bs-dismiss="modal"&gt;Cancel&lt;/button&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa" crossorigin="anonymous"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Can anyone suggest what I might have missed?</p>