โœฆ StealThis .dev

Time Range Picker

A time range picker with draggable start/end handles on a 24-hour timeline. Ideal for scheduling availability, meeting room booking, or shift planning.

Open in Lab
css vanilla-js
Targets: JS HTML

Code

Time Range Picker

A fully interactive time range picker built with vanilla JS and CSS. Drag the start and end handles along a 24-hour timeline to define a time window, with real-time display updates and preset shortcuts for common scheduling scenarios.

Features

  • Draggable start and end handles constrained to a 24-hour timeline
  • Live display showing selected range in 12-hour AM/PM format with duration
  • Preset buttons for common shifts: Morning, Afternoon, Full Day
  • Minimum 30-minute range enforcement to prevent zero-width selections
  • Touch-friendly via pointer events