Skip to content
Back

Date wheel

iOS-style wheels for day and time: drag, flick or scroll and it glides onto an entry; quick picks spin every reel.

oxyn add date-wheel
MCP
Send later
Sat, Sep 19
Sun, Sep 20
Mon, Sep 21
Tue, Sep 22
Yesterday
Today
Tomorrow
Sat, Sep 26
Sun, Sep 27
Mon, Sep 28
Tue, Sep 29
4
5
6
7
8
9
10
11
05
10
15
20
25
30
35
40
45
50
55
AM
PM
Today at 9:30 AM
Dioxus
rsx! {
    DateWheel {
        minute_step: 5,
        title: Some("Send later".into()),
        confirm: Some("Schedule".into()),
        on_change: move |(day, time)| when.set((day, time)),
    }
}

Rendered from Rust at build time · goes live when visible

When to use

  • "Send later" and "remind me" moments: pick a day and time with wheels, the way a phone does.
  • Fast with a thumb, exact with a keyboard.

When not to use

  • A field that opens the calendar in a popover: use Date picker instead.
  • A time field with a list at a fixed step: use Time picker instead.
  • Spin a 24-hour dial to pick a time and see which team cities are at work: use Time dial instead.

Installation

Date wheel is free and MIT. The oxyn CLI copies its code, and the components it needs, into src/oxyn/ of your Dioxus or GPUI project, so it is yours to change.

Terminal
cargo install --git https://github.com/ismailqureshi72/Oxyn oxyn-cli
oxyn init
oxyn add date-wheel
Rust
use crate::oxyn::{DateWheel, PRIMITIVES_CSS};

Rather depend on the crate? cargo add oxyn-dioxus oxyn-core --git https://github.com/ismailqureshi72/Oxyn, then use oxyn_dioxus::{DateWheel, PRIMITIVES_CSS};

Usage

Dioxus · rust
rsx! {
    DateWheel {
        minute_step: 5,
        title: Some("Send later".into()),
        confirm: Some("Schedule".into()),
        on_change: move |(day, time)| when.set((day, time)),
    }
}

Examples

Datetime

Day, hour, minute and AM / PM.

Send later
Sat, Sep 19
Sun, Sep 20
Mon, Sep 21
Tue, Sep 22
Yesterday
Today
Tomorrow
Sat, Sep 26
Sun, Sep 27
Mon, Sep 28
Tue, Sep 29
4
5
6
7
8
9
10
11
05
10
15
20
25
30
35
40
45
50
55
AM
PM
Today at 9:30 AM
Code
rsx! {
    DateWheel {
        minute_step: 5,
        title: Some("Send later".into()),
        confirm: Some("Schedule".into()),
        on_change: move |(day, time)| when.set((day, time)),
    }
}

Date

Month, day and year.

Send later
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
19
20
21
22
23
24
25
26
27
28
29
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
September 24, 2026
Code
rsx! {
    DateWheel {
        mode: "date",
        minute_step: 5,
        title: Some("Send later".into()),
        confirm: None,
        on_change: move |(day, time)| when.set((day, time)),
    }
}

Time

Time only, 24-hour.

Send later
04
05
06
07
08
09
10
11
12
13
14
05
10
15
20
25
30
35
40
45
50
55
09:30
Code
rsx! {
    DateWheel {
        mode: "time",
        minute_step: 5,
        hour_cycle: "24",
        title: Some("Send later".into()),
        confirm: Some("Schedule".into()),
        on_change: move |(day, time)| when.set((day, time)),
    }
}

Routine

Routine pick and words (Oxyn plus).

Send later
Sat, Sep 19
Sun, Sep 20
Mon, Sep 21
Tue, Sep 22
Yesterday
Today
Tomorrow
Sat, Sep 26
Sun, Sep 27
Mon, Sep 28
Tue, Sep 29
4
5
6
7
8
9
10
11
05
10
15
20
25
30
35
40
45
50
55
AM
PM
Today at 9:30 AM
Code
rsx! {
    DateWheel {
        minute_step: 5,
        title: Some("Send later".into()),
        routine: true,
        natural: true,
        confirm: Some("Schedule".into()),
        on_change: move |(day, time)| when.set((day, time)),
    }
}

API reference

DateWheel

PropTypeDefaultDescription
modeString"datetime"`datetime` · `date` · `time`.
dateString"2026-09-24"Starting day (ISO).
timeString"09:30"Starting time (`HH:mm`).
todayString"2026-09-24"Today (ISO).
minute_stepu325Minutes between minute entries.
hour_cycleString"12"`12` · `24`.
titleOption<String>Default::default()Heading above the summary.
presetsbooltrueShow quick picks.
routineboolDefault::default()Oxyn plus: a weekday-routine pick ("Weekdays 9:00").
confirmOption<String>Default::default()Confirm button label (`None` hides it).
speedf321.0Glide speed multiplier.
naturalboolDefault::default()Oxyn plus: type a moment in words.
labelString"Date and time"Accessible name.
on_changeEventHandler<(String, String)>—Came to rest on a new moment: `(ISO date, HH:mm)`.
on_confirmEventHandler<(String, String)>—Confirmed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabBetween reels, the quick picks and the button
↑or↓Turn the focused reel one entry
Page UporPage DownA week of days, 3 or 6 hours, 15 minutes, 10 years
HomeorEndFirst / last entry
TypeJump: 4 for 4 o'clock, 45 for :45, p for PM, ma for March

Accessibility

  • A named group; each reel is a spinbutton (Day, Hour, Minute, AM or PM) with an aria-valuetext such as “Fri, Sep 25”.
  • The full moment is announced once the reels rest; quick picks use aria-pressed.
  • Dates that don't exist (February 30) are dimmed and the day reel turns back by itself.
From the spec

A named group; each reel is a focusable spinbutton (Day, Hour, Minute, AM or PM / Month, Date, Year) with aria-valuenow and a spoken aria-valuetext ("Fri, Sep 25"). The full moment is announced politely once the reels rest. Quick picks use aria-pressed. Invalid days are dimmed and never selected.

Motion & interaction

Each reel is projected onto a cylinder (20° per entry, fading toward the back). Flicks keep their momentum and land on an entry through a critically damped spring, so the stop never overshoots. Keyboard steps add to the motion rather than restarting it. The summary ("Tomorrow at 9:30 AM") and the relative phrase update when the reels rest.

Timing
TransitionDurationEasingReduced motion
Glide (web)220 ms + 45 ms per row, ≤ 900 ms, ÷ speedcubic-bezier(.2,.9,.25,1)lands at once
Spring (core)ω = 16 × speedcritically dampedlands at once
Rubber band0.55 coefficient, 1.5 rows max——
Type-ahead window1,000 ms——
Confirm success900 ms pending (demo), 1.6 s shown—same

Responsive behaviour

  • Fits a 320 px phone; reels size to their widest entry under one lens.
  • Below 480 px the confirm button goes full width and 44 px tall.
Edge cases (spec)

Days default to 30 days back and a year ahead (date mode: 100 years back, 10 on). Minute values off the step land on the step below. Leap years in date mode. 320 px phones fit; reels size to their widest entry. Below 480 px the confirm button is full width and 44 px tall. Wheel / trackpad scroll turns one entry per notch.

Notes for AI

  • Import DateWheel from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: DateWheelEl in oxyn_gpui.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI