Skip to content
LyEve UI v0.60.1

Form controls

DatePicker

A text trigger that opens a calendar popover. Binds the value as an ISO date string (YYYY-MM-DD): pure local-date math, no timezone surprises.

Basic

With bounds and a hint

Trips must be booked at least 7 days out.

Under a touch screen

Every day takes a 44px target of its own. The calendar opens 320px wide there, 48px wider than under a mouse, which a phone of that width holds edge to edge, and its weeks sit 12px apart, so a tap near the edge of a day never picks the day beside or below it.

A calendar that would run past the side of the screen, or of the dialog or scrolling box it opens in, first aligns with its field's other edge, and when that does not fit either, slides back inside it with an 8px gap. In a container too short for it above and below, such as a one-field Modal, it opens below its field with its whole grid, and the container grows to hold it or scrolls down to it.

API

PropTypeDefaultDescription
value string''Bindable ISO date (YYYY-MM-DD).
label string no defaultField label.
placeholder string'Choose a date'Shown when no value is set.
min string (ISO date) no defaultEarliest selectable date.
max string (ISO date) no defaultLatest selectable date.
hint string no defaultSubdued hint below the field.
error string no defaultError message. Reddens the border.
disabled booleanfalseDisable the trigger.
required booleanfalseMark as required for form validation.
id string no defaultDOM id of the trigger button.
onchange (value: string) => void no defaultFires when a day is picked.
class string no defaultExtra classes on the wrapper.
noAI booleanfalseKeep the value from an assistant: a FormAssist never reports it or fills it, and the control is marked data-no-ai for a browser agent.
name string no defaultPosts the day with the surrounding form, through a hidden input.