Skip to content
v0.9.1
Forms

Time picker

Pick the hour and the minutes separately, or just type a time. 12-hour and 24-hour clocks. The field shows a friendly time; the form gets a plain HH:MM.

Pick or type

Put the input in .time. A tap opens three columns: hour, minutes, AM / PM. Each tap changes just that part, so 9:30 PM is three taps and changing the minutes later is one. Typing works too: 9, 930, 9:30p, 21:30 and noon are all understood and tidied when you leave the field.

<div class="cluster gap-4 items-end">
  <div class="form-field w-48">
    <label class="form-label" for="t-1">Start</label>
    <div class="time"><input class="form-control" id="t-1" name="start" data-format="12"></div>
  </div>
  <div class="form-field w-48">
    <label class="form-label" for="t-2">End</label>
    <div class="time"><input class="form-control" id="t-2" name="end" value="17:00" data-format="12"></div>
  </div>
</div>

12 or 24 hours

data-format="12" shows 1 to 12 with an AM / PM column. data-format="24" shows 00 to 23 and no AM / PM. Leave it out and it follows the page's language (<html lang>). Either way, the form gets the same HH:MM.

<div class="cluster gap-4 items-end">
  <div class="form-field w-48">
    <label class="form-label" for="t-5">12-hour</label>
    <div class="time"><input class="form-control" id="t-5" data-format="12" value="21:30"></div>
  </div>
  <div class="form-field w-48">
    <label class="form-label" for="t-4">24-hour</label>
    <div class="time"><input class="form-control" id="t-4" data-format="24" value="21:30"></div>
  </div>
</div>

Step and limits

data-step is the minutes between choices in the minutes column (default 5: 00, 05, 10 ...). data-min and data-max keep it inside opening hours: hours and minutes outside them are greyed out, and a typed time outside them is flagged.

9 AM to 5 PM, every 15 minutes

24-hour clock, on the half hour

<div class="cluster gap-4 items-end">
  <div class="form-field w-48">
    <label class="form-label" for="t-3">Appointment</label>
    <div class="time"><input class="form-control" id="t-3" data-format="12" data-step="15" data-min="09:00" data-max="17:00"></div>
    <p class="form-hint">9 AM to 5 PM, every 15 minutes</p>
  </div>
  <div class="form-field w-48">
    <label class="form-label" for="t-6">Departure</label>
    <div class="time"><input class="form-control" id="t-6" data-format="24" data-step="30"></div>
    <p class="form-hint">24-hour clock, on the half hour</p>
  </div>
</div>

Notes

Start

OverviewStart Getting startedStart CustomizeStart

Guides

AccessibilityGuides BreakpointsGuides ChangelogGuides Customize componentsGuides JavaScriptGuides MotionGuides OptimizeGuides PhonesGuides RebootGuides Right-to-left (RTL)Guides Stacking orderGuides Using Momo with AIGuides

Foundations

ColorsFoundations TypographyFoundations ProseFoundations Images & figuresFoundations CodeFoundations Lines & shadowsFoundations Dark modeFoundations

Forms

Checkbox & switchForms ComboboxForms Date pickerForms Date rangeForms Fields & labelsForms File uploadForms Floating labelsForms Number stepperForms PasswordForms PIN codeForms RatingForms SelectForms SliderForms Tag inputForms Time pickerForms ValidationForms

Components

AccordionComponents Alert & bannerComponents AvatarComponents BadgeComponents BreadcrumbComponents ButtonComponents Button groupComponents CalendarComponents CardComponents CarouselComponents ChartsComponents ChipsComponents CollapseComponents Command paletteComponents CommentsComponents Confirm dialogsComponents Cookie bannerComponents Data tableComponents Description listComponents Dialog & toastComponents DividerComponents DrawerComponents Dropdown menuComponents Empty stateComponents File managerComponents Filter & sortComponents Gallery & lightboxComponents Inbox & chatComponents Infinite scrollComponents KanbanComponents Keyboard shortcutsComponents List groupComponents MarqueeComponents Media objectComponents Nav overflowComponents Notification centerComponents PaginationComponents ProgressComponents Pull to refreshComponents SkeletonComponents SortableComponents SpinnerComponents Split viewComponents Stat cardComponents Steps & wizardComponents Swipe actionsComponents TableComponents TabsComponents TimelineComponents TogglerComponents Tooltip & popoverComponents TourComponents Tree viewComponents VideoComponents WhiteboardComponents

Layout

Announcement barLayout App shellLayout Back to topLayout Container & sectionLayout ExamplesLayout FooterLayout HeroLayout JumbotronLayout Mega menuLayout NavbarLayout Site sidebarLayout

Sections

Bento gridSections Blog cardsSections Call to actionSections Contact & newsletterSections FAQSections FeaturesSections Logo cloudSections PricingSections TeamSections TestimonialsSections

Utilities

OverviewUtilities State variantsUtilities Display & flexUtilities Grid & gapUtilities SpacingUtilities SizingUtilities TextUtilities Links & color strengthUtilities Position & overflowUtilities BackgroundsUtilities Borders & effectsUtilities Transforms & filtersUtilities InteractionsUtilities

Helpers

Fixed, sticky & frostedHelpers Hover & focusHelpers Hover revealHelpers Icon linkHelpers PrintHelpers Relative timeHelpers Screen reader textHelpers Scroll inHelpers ScrollspyHelpers Share buttonHelpers Skip linkHelpers StacksHelpers Stretched linkHelpers Theme toggleHelpers Truncated textHelpers

Page patterns

404 pagePage patterns Coming soonPage patterns Login & registerPage patterns SettingsPage patterns ProfilePage patterns CRM contactsPage patterns ProjectsPage patterns File manager pagePage patterns Billing & plansPage patterns Help centerPage patterns Mobile app screensPage patterns
↑ ↓ moveEnter openEsc close