Snippets Datepicker

Bootstrap 5 Date and Time Picker for Booking

A booking card where you pick a day from a weekly strip, choose an available time slot and confirm with a live summary.

Bootstrap 5 No jQuery Jul 2020 5K views

<section class="wdw-stage">
  <div class="container" style="max-width:860px">
    <div class="wdw-card overflow-hidden" id="booker">
      <div class="row g-0">
        <div class="col-md-4 wdw-aurora p-4 p-md-4 d-flex flex-column gap-3">
          <img src="https://i.pravatar.cc/120?img=47" alt="Dr. Maya Lindqvist" width="56" height="56" class="rounded-circle border border-2 border-white border-opacity-50">
          <div>
            <p class="small text-uppercase fw-semibold opacity-75 mb-1" style="letter-spacing:.08em">Book a session</p>
            <h1 class="h4 fw-bold mb-1">30-min consultation</h1>
            <p class="small opacity-75 mb-0">with Dr. Maya Lindqvist</p>
          </div>
          <ul class="list-unstyled small mt-auto mb-0 d-grid gap-2 opacity-75">
            <li>Video call, link sent by email</li>
            <li>Free cancellation up to 24h before</li>
          </ul>
        </div>
        <div class="col-md-8 p-4">
          <div class="d-flex align-items-center justify-content-between mb-3">
            <h2 class="h6 fw-bold mb-0" data-month>Select a date</h2>
            <div class="btn-group btn-group-sm">
              <button type="button" class="btn btn-outline-secondary rounded-start-pill px-3" data-week="-1" aria-label="Previous week">‹</button>
              <button type="button" class="btn btn-outline-secondary rounded-end-pill px-3" data-week="1" aria-label="Next week">›</button>
            </div>
          </div>
          <div class="d-flex gap-2 mb-4 days" role="radiogroup" aria-label="Date" data-days></div>

          <h2 class="h6 fw-bold mb-3">Available times</h2>
          <div class="row row-cols-3 row-cols-sm-4 g-2 mb-4" role="radiogroup" aria-label="Time" data-times></div>

          <div class="d-flex flex-column flex-sm-row align-items-sm-center justify-content-between gap-3 pt-3 border-top">
            <p class="mb-0 small text-body-secondary" data-summary role="status" aria-live="polite">Choose a date and time.</p>
            <button type="button" class="btn btn-primary rounded-pill px-4" data-confirm disabled>Confirm booking</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.