<!-- Date Picker with Flatpickr -->
<div class="relative mb-6">
<label for="flatpickr" class="mb-2 block">Select Date</label>
<input type="text" id="flatpickr" class="w-full uajskeiolksb py-2 backdrop-opacity-95 backdrop-blur backdrop-saturate-150 bg-white/20 dark:bg-neutral-400/40 border border-black/[.05] dark:border-white/30 rounded focus:shadow-sm focus:border-purple-500 dark:focus:border-purple-300 focus:outline-none focus:ring-0" placeholder="Select a date">
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
flatpickr("#flatpickr", {
dateFormat: "Y-m-d", // Format: YYYY-MM-DD
altInput: true,
altFormat: "F j, Y", // Human-friendly format
allowInput: true
});
});
</script>
<!-- Date Range Picker with Flatpickr -->
<div class="relative mb-6">
<label for="date-range" class="mb-2 block">Select Date Range</label>
<input type="text" id="date-range" class="w-full uajskeiolksb py-2 backdrop-opacity-95 backdrop-blur backdrop-saturate-150 bg-white/20 dark:bg-neutral-400/40 border border-black/[.05] dark:border-white/30 rounded focus:shadow-sm focus:border-purple-500 dark:focus:border-purple-300 focus:outline-none focus:ring-0" placeholder="Select date range">
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
flatpickr("#date-range", {
mode: "range", // Enable range mode for selecting two dates
minDate: "today", // Start date selection from today
dateFormat: "Y-m-d", // Format: YYYY-MM-DD
altInput: true, // Show a more human-readable format
altFormat: "F j, Y", // e.g. January 1, 2024
allowInput: true
});
});
</script>