Skip to content
wdj

TimeRangePicker

Implemented Input

Reusable time filter with relative presets, calendar selection, exact times and UTC form values.

A wdj composition built from the existing component library.

Presentation commands show demo feedback. Read the interaction guide to connect real actions.

Time range filter

Quick ranges, custom durations, calendar dates and local or UTC times with explicit Apply and Cancel.

Request activity

Choose a rolling window or an exact date and time range.

Show template
{% load wdj %}
<div class="flex w-full flex-col gap-4" x-data="{ range: null }" @wdj:time-range-change="range = $event.detail">
  <div class="flex flex-wrap items-center justify-between gap-3">
    <div class="grid gap-1"><p class="text-base font-medium">Request activity</p><p class="text-base text-kumo-subtle">Choose a rolling window or an exact date and time range.</p></div>
    {% include "wdj/components/time_range_picker.html" with id="activity-time-range" only %}
  </div>
  <p class="text-base text-kumo-subtle" role="status" x-text="range ? 'Applied: ' + range.start + ' to ' + range.end : 'The last hour is selected. Changes are applied when you choose Apply.'"></p>
</div>

Form integration

Custom presets, initial UTC values, JSON form submission and native reset.

A custom preset list, an initial absolute UTC range and native form reset.

Show template
{% load wdj %}
<form class="flex w-full flex-col gap-4" x-data="{ result: '' }" @submit.prevent="result = JSON.stringify(JSON.parse(new FormData($event.target).get('period')), null, 2)" @reset="result = ''">
  <div class="flex flex-wrap items-center gap-3">
    {% include "wdj/components/time_range_picker.html" with id="report-time-range" name="period" value=time_range_initial presets=time_range_presets only %}
    {% include "wdj/components/button.html" with type="submit" label="Submit form" only %}
    {% include "wdj/components/button.html" with type="reset" label="Reset" variant="ghost" only %}
  </div>
  <p class="text-base text-kumo-subtle">A custom preset list, an initial absolute UTC range and native form reset.</p>
  <output class="block whitespace-pre-wrap break-words font-mono text-sm" x-text="result" aria-live="polite"></output>
</form>

API Reference

Prop Type Default Description
dict: {mode, seconds?, start?, end?, timezone} Last 1 hour, local time Relative: {mode: relative, seconds, timezone}. Absolute: {mode: absolute, start, end, timezone}. Start/end require UTC or offset ISO timestamps; timezone is local or UTC.
string time_range One hidden JSON field containing mode, UTC start/end, timezone and seconds for relative ranges. Updated only on Apply.
string unset Stable unique DOM ID; important for HTMX targets and focus restoration.
list[dict] 30m, 1h, 6h, 12h, 24h, 7d, 30d List of {seconds, label}; whole-minute durations from 60 to 31536000 seconds. An empty list hides quick ranges.
bool False Allow future end times and calendar days. Disabled by default for activity filters.
bool False Disable the trigger and omit the value from native form submission.
string "" Class; pass the documented value shown in the examples.

Accessibility notes

Every interactive component keeps real semantics and keyboard support: native controls where possible, ARIA only where necessary, and a visible focus ring. See the Accessibility page for the shared contract.

Read the accessibility contract

Components

Components overview
AccountMenuReusable account navigation with nested preference menus, persisted appearance and application-owned actions.
AutocompleteFree-form input with local or HTMX-filtered suggestions.
BadgeSolid, tinted, outline and dot status labels.
BannerInline message bar with variants and optional action.
BreadcrumbsTrail navigation in two sizes.
ButtonVariants, sizes, shapes, icons and loading state.
ButtonGroupJoins a small set of tightly-coupled buttons into a single control (split buttons).
CheckboxSingle checkbox and indeterminate state.
ClipboardTextRead-only text field with a one-click copy-to-clipboard button.
Code / CodeHighlightedEscaped Pygments grammar highlighting, multiline tokens, line numbers, highlighted lines and localized copying.
CollapsibleComposable disclosure component for showing and hiding content.
Combobox / AutocompleteKumo-styled input/button triggers, search inside the popup, grouped local choices and debounced HTMX search.
CommandPaletteAccessible spotlight search overlay with Cmd+K keyboard shortcut.
DatePickerKumo-styled date and datetime popups; inline single, multiple and range calendars with bounds/presets.
DateRangePickerStyled popup or inline range calendar with bounds, presets and separately named form values.
DialogNative <dialog> modal with focus management.
DrawerEdge-anchored modal panel. LayerDialog has its own layered component.
DropdownMenuNative details menu with delegated keyboard navigation and dismissal.
EmptyEmpty-state placeholder with icon and action.
FieldLabel + description + error wrapper. Built into each control.
FieldSelectorSearchable column selector with ordering, required fields, optional persistence and table integration.
FilterBuilderReusable filter editor with AND conditions, typed values, draft/apply semantics and a JSON form contract.
FlowDirected diagrams with branches, SVG connectors, custom anchors and responsive local scrolling.
GridResponsive CSS grid layout container with preset column configurations.
InlineCopyTextCompact borderless copy control for IDs and short values.
InputText field with label, description, leading/trailing icons.
InputAreaMulti-line textarea with auto-resize option.
InputGroupInput field with seamless prefix, suffix, and addon attachments.
LabelForm field label, optional marker and tooltip.
LayerCardCompound surface card with distinct primary and secondary layers.
LayerDialogLayered native modal with actions, forms, nested dialogs and pending states.
LinkInline, current and plain text links.
LoaderAnimated spinner in three sizes.
MenuBarCompact view selector using native radio semantics.
MeterProgress bar showing a measured value within a known range.
PaginationA page navigation component for navigating through paginated content.
PopoverAnchored popup with interactive content.
RadioRadio group, vertical and horizontal.
SelectKumo-styled Alpine dropdown with groups, rich options and multiple selection; native form values and fallback.
SensitiveInputPassword/secret input with reveal toggle and copy button.
SEOServer-rendered page metadata: title, description, canonical, Open Graph, language alternatives and safe JSON-LD.
SeparatorHorizontal / vertical rules with optional label.
SidebarRecursive navigation groups, pinned links, account/zone views, search, loading, resize and full-screen mobile breadcrumbs.
SkeletonShimmer placeholder.
SliderInset single/range selection with vertical grips, value badges, endpoint labels and native keyboard/form behavior.
SurfaceBordered surface panel with header slot.
SwitchOn/off toggle in three sizes.
TableServer-driven tables with selection, sticky columns, field configuration and expandable details.
Table of contentsPage section navigation tree with active link indicator.
TabsSegmented and underline tabs with a sliding indicator, responsive overflow and local Alpine or URL/HTMX state.
TagInputMulti-value badge input for tags and recipients.
TextHeading, body, secondary, success, error and mono text.
TimeRangePickerReusable time filter with relative presets, calendar selection, exact times and UTC form values.
ToastyExpandable notification stack with variants, paused expiry and a live region.
ToolbarCompact grouped controls with shared borders, composed filters and keyboard arrow navigation.
TooltipHover and focus tooltip with grouped delays, Escape dismissal and viewport bounds.
↑ ↓ Navigate ↵ Select