Empty
Type YYYY-MM-DD or choose a day using the custom calendar.
defaultValue=""
WelkUI!REACT EDITIONExplore live variants, compare states, and learn every prop. Pick a component to start.
A compact editable date field that opens the library's custom calendar rather than a browser date popup. It shares the DatePicker API and keyboard/date-selection behavior. Date values and bounds use YYYY-MM-DD; an empty string clears the value.
import { WelkDateInput } from "@welkui/react";
<WelkDateInput label="Launch date" defaultValue="2026-10-23" />Import @welkui/react/styles.css once in your app. Stateful snippets belong inside a React component.
These are real components, not screenshots. Compare their appearance and try the controls. Key props below each preview show what changes; use the usage example above for imports and component setup.
Type YYYY-MM-DD or choose a day using the custom calendar.
defaultValue=""Starts on a known date; selecting a day updates the field.
defaultValue="2026-10-23"Only October 20-28, 2026 can be selected. Navigate the calendar to inspect disabled days.
min="2026-10-20" max="2026-10-28"A visible value with selection and editing disabled.
disabled defaultValue="2026-10-23"Required props are marked in the default column. Other props are optional. ReactNode accepts text or JSX.
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | Required | Visible, accessible control label. |
value | string | Uncontrolled | Controlled selection. Update it in onValueChange. |
defaultValue | string | "" | Initial value for uncontrolled use. |
onValueChange | (value: string) => void | Unset | Called with the updated value; an empty string clears it. |
min | string | Unset | Earliest allowed date, in YYYY-MM-DD format. |
max | string | Unset | Latest allowed date, in YYYY-MM-DD format. |
name | string | Unset | Name used when submitting a native form. |
id | string | Generated | Control identifier; automatically linked to its label. |
disabled | boolean | false | Prevents interaction. |
required | boolean | false | Enables native required-field validation. |
className | string | Unset | Additional CSS class on the component root. |
This component supports the props listed above, not arbitrary native HTML attributes.
Import @welkui/react/styles.css once in your app entry or Next.js root layout. The previews use the default theme; override --welk-* CSS tokens in your app to customize it.
For Next.js, put hooks and event handlers in a component beginning with "use client". Keep state local to the component using the control. The library preserves its client boundaries and uses your installed React version.
Use defaultValue or defaultChecked for uncontrolled fields, or a state value and its change callback for controlled fields. Do not switch between these modes during the lifetime of a field.
Modal and notification examples start closed: use their Try buttons to see them. Disabled examples are deliberately non-interactive. Validate forms, uploads, authentication, and server responses in your application; these components only provide UI.