// Generated by scripts/generate-showcase.mjs. Do not edit directly.
page DatePickerDetail {
layout = "showcase"
state playground_size = ctx.url.searchParams.get("pg_size") ?? "default"
state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary"
state playground_label = ctx.url.searchParams.get("pg_label") ?? "Date Picker"
state playground_id = ctx.url.searchParams.get("pg_id") ?? ""
state playground_name = ctx.url.searchParams.get("pg_name") ?? ""
state playground_value = ctx.url.searchParams.get("pg_value") ?? "2026-09-20"
state playground_placeholder = ctx.url.searchParams.get("pg_placeholder") ?? "Enter a sample value"
state playground_type = ctx.url.searchParams.get("pg_type") ?? "date"
state playground_locale = ctx.url.searchParams.get("pg_locale") ?? "en-US"
state playground_firstDayOfWeek = Number(ctx.url.searchParams.get("pg_firstDayOfWeek") ?? "0")
state playground_months = JSON.parse(ctx.url.searchParams.get("pg_months") ?? "[{\"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\"}]")
state playground_days = JSON.parse(ctx.url.searchParams.get("pg_days") ?? "[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]")
state playground_years = JSON.parse(ctx.url.searchParams.get("pg_years") ?? "[2024,2025,2026,2027,2028,2029,2030]")
state playground_min = ctx.url.searchParams.get("pg_min") ?? ""
state playground_max = ctx.url.searchParams.get("pg_max") ?? ""
state playground_step = ctx.url.searchParams.get("pg_step") ?? ""
state playground_helperText = ctx.url.searchParams.get("pg_helperText") ?? ""
state playground_cornerHint = ctx.url.searchParams.get("pg_cornerHint") ?? ""
state playground_error = ctx.url.searchParams.get("pg_error") ?? ""
state playground_variant = ctx.url.searchParams.get("pg_variant") ?? "normal"
state playground_inline = (ctx.url.searchParams.get("pg_inline") ?? "false") === "true"
state playground_readonly = (ctx.url.searchParams.get("pg_readonly") ?? "false") === "true"
state playground_disabled = (ctx.url.searchParams.get("pg_disabled") ?? "false") === "true"
state playground_required = (ctx.url.searchParams.get("pg_required") ?? "false") === "true"
state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1"
seo {
title = "Date Picker"
description = "Theme-aware, responsive date picker component."
}
view {
Components / Base / Date Picker
Interactive playground Configure Date Picker Change any prop and inspect the server-rendered component immediately.
Live preview
page DatePickerExample {
state months = [
{
"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"
}
]
state days = [
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
]
state years = [
2024,
2025,
2026,
2027,
2028,
2029,
2030
]
view {
<DatePicker
value="2026-09-20"
placeholder="Enter a sample value"
months="{ months} "
days="{ days} "
years="{ years} "
/>
}
}
Event output Interact with the preview to inspect the typed payload.
Live examples Designed for real product surfaces Compare configurations and resize the browser to check responsive behavior.
page DatePickerExample {
state months = [
{
"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"
}
]
state days = [
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
]
state years = [
2024,
2025,
2026,
2027,
2028,
2029,
2030
]
view {
<DatePicker
label="Start date"
name="start-date"
value="2026-09-20"
placeholder="Enter a sample value"
months="{ months} "
days="{ days} "
years="{ years} "
/>
}
}
page DatePickerExample {
state months = [
{
"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"
}
]
state days = [
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
]
state years = [
2024,
2025,
2026,
2027,
2028,
2029,
2030
]
view {
<DatePicker
size="sm"
label="Schedule for"
name="schedule"
value="2026-09-20T09:30"
placeholder="Enter a sample value"
type="datetime-local"
months="{ months} "
days="{ days} "
years="{ years} "
variant="secondary"
/>
}
}
page DatePickerExample {
state months = [
{
"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"
}
]
state days = [
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
]
state years = [
2024,
2025,
2026,
2027,
2028,
2029,
2030
]
view {
<DatePicker
size="lg"
label="Scheduled date"
value="2026-09-22"
placeholder="Search by name, email, or identifier"
months="{ months} "
days="{ days} "
years="{ years} "
variant="success"
readonly="true"
/>
}
}
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.
<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.
Prop Type Default Required 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 firstDayOfWeeknumber 0No months{ label: string; value: string }[] [{ 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 daysnumber[] [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 yearsnumber[] [2024, 2025, 2026, 2027, 2028, 2029, 2030]No minstring ""No maxstring ""No stepstring ""No helperTextstring ""No cornerHintstring ""No errorstring ""No variantstring "normal"No inlineboolean falseNo readonlyboolean falseNo disabledboolean falseNo requiredboolean falseNo classstring ""No
}
}