DateField

A feature-packed date/time picker that supports 6 distinct modes: date, datetime, time, dateRange, timeRange, and dateTimeRange. Includes responsive dual-month calendars on desktop and single-month on mobile, quick presets, decade jumps, time spinners, and full Loomora i18n localization.

Interactive live playground

Tweak props, change states, and see the live component respond in real time.

Live

How to call

Import directly from the Loomora package root. For projects without Tailwind CSS, ensure loomora/dist/index.css is imported once in your root layout.

import { DateField } from 'loomora'

<DateField label="Appointment date" properties={{ mode: 'datetime', value, onChange: setValue }} />

API reference

Important public props and how they affect rendering.

8 props
PropTypeDefaultDescription
properties.mode'date' | 'datetime' | 'time' | 'dateRange' | 'timeRange' | 'dateTimeRange''date'Operational mode of the picker.
properties.value / onChangeDate | string | [Date, Date] | null—Controlled picker value and change callback.
properties.minDate / maxDateDate | string—Restricts the selectable date range.
properties.hour12booleanconfig default (true)Toggles 12-hour AM/PM format versus 24-hour.
properties.showSecondsbooleanfalseShows the seconds column in time pickers.
properties.allowClearbooleantrueShows an inline clear button when a value is selected.
properties.showPresetsbooleantrueEnables quick preset shortcuts (Today, Yesterday, Last 7 days, etc.).
properties.disabledDates(date: Date) => boolean—Custom function to disable specific dates (e.g. holidays).