Production default
Balanced spacing, hierarchy, and content for the most common product workflow.
<DatePicker
value="sample-1"
placeholder="Enter a sample value"
/>
// 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") ?? "sample-1"
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 = ctx.url.searchParams.get("pg_firstDayOfWeek") ?? "0"
state playground_months = ctx.url.searchParams.get("pg_months") ?? ""
state playground_days = ctx.url.searchParams.get("pg_days") ?? ""
state playground_years = ctx.url.searchParams.get("pg_years") ?? ""
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"
state playground_readonly = ctx.url.searchParams.get("pg_readonly") ?? "false"
state playground_disabled = ctx.url.searchParams.get("pg_disabled") ?? "false"
state playground_required = ctx.url.searchParams.get("pg_required") ?? "false"
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 {
Theme-aware, responsive date picker component. Change any prop and inspect the server-rendered component immediately.Date Picker
Configure Date Picker
<DatePicker
value="sample-1"
placeholder="Enter a sample value"
/>
Compare configurations and resize the browser to check responsive behavior.
Balanced spacing, hierarchy, and content for the most common product workflow.
<DatePicker
value="sample-1"
placeholder="Enter a sample value"
/>
A tighter variation for dashboards, side panels, tables, and operational interfaces.
<DatePicker
size="sm"
label="Compact example"
value="sample-2"
placeholder="Enter a sample value"
variant="secondary"
/>
A more expressive variation using additional data, stronger emphasis, and optional states.
<DatePicker
size="lg"
label="Advanced example"
value="sample-3"
placeholder="Search by name, email, or identifier"
variant="success"
/>
Public events declared by this component. Custom events bubble from the component root and expose state through event.detail.
@inputFires immediately as the component value changes.@changeFires when the component value or selection changes.@openFires when the component opens.@closeFires when the component closes.@focusFires when the component receives focus.@blurFires when focus leaves the component.@invalidFires when the component emits the invalid event.const component = document.querySelector('[data-wrn-events]')
component.addEventListener('input', (event) => {
console.log(event.detail)
})All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|---|---|---|
size | string | "default" | No |
color | string | "primary" | No |
label | string | "Date Picker" | No |
id | string | "" | No |
name | string | "" | No |
value | string | "" | No |
placeholder | string | "" | No |
type | string | "date" | No |
locale | string | "en-US" | No |
firstDayOfWeek | number | 0 | No |
months | 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 |
days | string | [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 |
years | string | [2024, 2025, 2026, 2027, 2028, 2029, 2030] | No |
min | string | "" | No |
max | string | "" | No |
step | string | "" | No |
helperText | string | "" | No |
cornerHint | string | "" | No |
error | string | "" | No |
variant | string | "normal" | No |
inline | boolean | false | No |
readonly | boolean | false | No |
disabled | boolean | false | No |
required | boolean | false | No |
class | string | "" | No |