Components / Date & time

DatePicker

A text field with a calendar popover. Accepts typed ISO and US dates.

@ruckc/truss-ui Date & time

Import

import { DatePicker } from '@ruckc/truss-ui';

Playground

weekStart
value

API

PropTypeDefaultDescription
value bindable string—The current value. Bind it with `bind:value`.
label string—Visible label shown above the control.
ariaLabel string—Accessible name, for use when there is no visible `label`.
min string—Minimum allowed value.
max string—Maximum number to show before collapsing the rest.
placeholder string'YYYY-MM-DD'Hint shown while the field is empty.
disabled booleanfalseDisables the control: it cannot be focused, changed or activated.
error string—Error message. Marks the control invalid, replaces the hint, and is announced to assistive technology.
weekStart number0First day of the week: 0 = Sunday … 6 = Saturday.
locale string'en-US'BCP-47 locale used for month and weekday names.
/docs/date-picker Truss UI · MIT