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
| Prop | Type | Default | Description |
|---|---|---|---|
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 | boolean | false | Disables 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 | number | 0 | First day of the week: 0 = Sunday … 6 = Saturday. |
locale | string | 'en-US' | BCP-47 locale used for month and weekday names. |