Date Range Picker

Live Demos Hub
GitHub ↗

Date Range Picker

Interactive production-grade hypermedia component for HTMXUI.

Interactive Preview

to

HTML Source

<!-- 
  Component: date-range-picker.html
  Configurable State: themeColor ('primary'|'secondary'|'destructive'), size ('sm'|'md'|'lg'), isOpen (boolean)
  Usage: Bind styles dynamically using hx-class="{ 'bg-primary': themeColor === 'primary' }" or hx-style="{ width: size === 'lg' ? '100%' : 'auto' }"
-->
<div hx-ext="reactive" hx-state="{ themeColor: \'primary\', size: \'md\', isOpen: false }"  class="flex items-center space-x-2">
  <input type="date" name="{start_name}" class="flex h-10 rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" />
  <span class="text-muted-foreground">to</span>
  <input type="date" name="{end_name}" class="flex h-10 rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" />
</div>