1. Reference
  2. Forms and input

<time-picker>

A field that opens the Material time picker; name= holds the chosen time as HH:mm.

Forms and input
time-picker.ham
<column style="w-full gap-8">
    <time-picker id="alarm"
                 name="alarm"
                 label="Wake me at"
                 value="07:30"/>
    <text @text="'Alarm set for ' + $alarm"
          style="muted"></text>
</column>
The snippet drawn by Hype Apps on a phone, in light mode The snippet drawn by Hype Apps on a phone, in dark mode
This snippet as Hype Apps draws it on a phone. It follows this page's light or dark theme.

Attributes

NameWhat it doesDefault
label Picker label
string
Select Time
name Variable that holds the time as HH:mm: value= from the start, then each pick.
string
value Initial time in HH:MM format
string

Readings

NameWhat it does
hour The picked hour, 0-23.
minute The picked minute, 0-59.
value The picked time as HH:mm.

Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.

This page is also Markdown, and all of HAM is in llms.txt.