Date Picker | UI Showcase
WRNexus UI
Base component

Date Picker

Theme-aware, responsive date picker component.

25 props0 slots7 outputsTheme readyResponsive
Interactive playground

Configure Date Picker

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
<DatePicker
  value="sample-1"
  placeholder="Enter a sample value"
/>
Event outputInteract with the preview to inspect the typed payload.
Component props25 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Production default

Balanced spacing, hierarchy, and content for the most common product workflow.

01
Live preview
Component usage.wrn
<DatePicker
  value="sample-1"
  placeholder="Enter a sample value"
/>
Dense UI

Compact application

A tighter variation for dashboards, side panels, tables, and operational interfaces.

02
Live preview
Component usage.wrn
<DatePicker
  size="sm"
  label="Compact example"
  value="sample-2"
  placeholder="Enter a sample value"
  variant="secondary"
/>
Extended

Rich configuration

A more expressive variation using additional data, stronger emphasis, and optional states.

03
Live preview
Component usage.wrn
<DatePicker
  size="lg"
  label="Advanced example"
  value="sample-3"
  placeholder="Search by name, email, or identifier"
  variant="success"
/>
Component outputs

Receive every typed component output

Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.

@inputFires as the editable value changes.
@changeFires when the component's committed value or selection changes.
@openFires after the component opens.
@closeFires after the component closes.
@focusFires when the interactive control receives focus.
@blurFires when focus leaves the interactive control.
@invalidFires when the component emits the invalid event.
Declarative handlers.wrn
<DatePicker
  @input='console.log(payload)'
  @change='console.log(payload)'
  @open='console.log(payload)'
  @close='console.log(payload)'
  @focus='console.log(payload)'
  @blur='console.log(payload)'
  @invalid='console.log(payload)'
/>
Direct output handlers.js
import { registerOutputHandler } from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"DatePicker\"], [data-component=\"DatePicker\"]")

if (component) registerOutputHandler(component, "input", (payload) => {
  console.log("input", payload)
})

if (component) registerOutputHandler(component, "change", (payload) => {
  console.log("change", payload)
})

if (component) registerOutputHandler(component, "open", (payload) => {
  console.log("open", payload)
})

if (component) registerOutputHandler(component, "close", (payload) => {
  console.log("close", payload)
})

if (component) registerOutputHandler(component, "focus", (payload) => {
  console.log("focus", payload)
})

if (component) registerOutputHandler(component, "blur", (payload) => {
  console.log("blur", payload)
})

if (component) registerOutputHandler(component, "invalid", (payload) => {
  console.log("invalid", payload)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
sizestring"default"No
colorstring"primary"No
labelstring"Date Picker"No
idstring""No
namestring""No
valuestring""No
placeholderstring""No
typestring"date"No
localestring"en-US"No
firstDayOfWeeknumber0No
monthsstring[{ label: "Jan", value: "01" }, { label: "Feb", value: "02" }, { label: "Mar", value: "03" }, { label: "Apr", value: "04" }, { label: "May", value: "05" }, { label: "Jun", value: "06" }, { label: "Jul", value: "07" }, { label: "Aug", value: "08" }, { label: "Sep", value: "09" }, { label: "Oct", value: "10" }, { label: "Nov", value: "11" }, { label: "Dec", value: "12" }]No
daysstring[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]No
yearsstring[2024, 2025, 2026, 2027, 2028, 2029, 2030]No
minstring""No
maxstring""No
stepstring""No
helperTextstring""No
cornerHintstring""No
errorstring""No
variantstring"normal"No
inlinebooleanfalseNo
readonlybooleanfalseNo
disabledbooleanfalseNo
requiredbooleanfalseNo
classstring""No