Booking Form Combo
A booking form combining Flatpickr, Choices and a SweetAlert confirm.
Requires Bootstrap 5, Flatpickr, Choices.js, SweetAlert2. Add the CDN tags below to your page (styles in
<head>, scripts before </body>). The downloaded file already includes them.<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr@4.6.13/dist/flatpickr.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/choices.js@10.2.0/public/assets/styles/choices.min.css"><script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script><script src="https://cdn.jsdelivr.net/npm/flatpickr@4.6.13"></script><script src="https://cdn.jsdelivr.net/npm/choices.js@10.2.0/public/assets/scripts/choices.min.js"></script><script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script><div class="card border-0 shadow-sm" style="max-width:360px"><div class="card-body">
<h6 class="fw-bold mb-3">Book a session</h6>
<label class="form-label small fw-semibold">Date</label><input class="form-control mb-2" id="bkDate" placeholder="Pick date">
<label class="form-label small fw-semibold">Service</label><select id="bkSvc" class="mb-2"><option>Consultation</option><option>Design review</option><option>Coaching</option></select>
<button class="btn btn-primary w-100" id="bkGo">Confirm booking</button>
</div></div>flatpickr('#bkDate',{minDate:'today',dateFormat:'D, M j'});
new Choices('#bkSvc',{searchEnabled:false,itemSelectText:''});
document.getElementById('bkGo').onclick=function(){Swal.fire({icon:'success',title:'Booked!',text:'We sent a confirmation email.',timer:2200})};Free to use.This component uses Bootstrap 5, Flatpickr, Choices.js, SweetAlert2 (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.