DatePicker
A pill showing the date; a calendar with circles, today ringed, and a typed ISO field.
<DatePicker label="Expires" defaultValue={new Date(2027, 0, 1)} />import { DatePicker, DateRangePicker, Calendar, TimeInput } from "@logicplanes/kaeso-ui";Props
aria-labelstringNames the trigger when there is no
label: "Expires". What it shows (the date, or the placeholder) becomes its description.aria-labelledbystringNames the trigger by the elements with these ids, as
aria-labeldoes.defaultValueDate | nullThe chosen day on first render.
descriptionReactNodeOne sentence of help under the label.
disabledbooleanTurns it off: it can't be used, and it looks dimmed.
disabledDays((date: Date) => boolean)Returns
truefor days that can't be chosen.idstringThe id of the control, so a label elsewhere can point to it.
labelReactNodeThe visible label.
layout"horizontal" | "vertical"The label above the control (
vertical) or beside it (horizontal).onValueChange((value: Date | null) => void)Called with the chosen day, or
nullwhen it is cleared.optionalbooleanAdds “Optional” to the label, for forms where most fields are required.
placeholderstringShown without a date. Defaults to "Pick a date" ("Pick a range" for a range) in the provider's language.
requiredbooleanMarks it as required in a form.
size"md" | "sm" | "lg"The height of the field.
valueDate | nullThe chosen day, when you control it.
weekStartsOn0 | 4 | 1 | 2 | 3 | 5 | 6The first day of the week, from 0 (Sunday) to 6 (Saturday); the language decides by default.