---
title: DatePicker
description: JSON Schema for the DatePicker component.
---

Date picker with a popover calendar.

```json
{
  "type": "object",
  "properties": {
    "type": {
      "const": "DatePicker",
      "default": "DatePicker",
      "type": "string"
    },
    "id": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "HTML id attribute for CSS targeting. Applied to the outermost element."
    },
    "cssClass": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "CSS/Tailwind classes for styling. Accepts a Responsive() for breakpoint-aware classes."
    },
    "onMount": {
      "default": null,
      "description": "Action(s) to execute when this component mounts."
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "State key for reactive binding. Auto-generated if omitted."
    },
    "value": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "Initially selected date (ISO string)"
    },
    "placeholder": {
      "default": "Pick a date",
      "description": "Button text when no date is selected",
      "type": "string"
    },
    "onChange": {
      "$ref": "Action",
      "description": "Action(s) when date changes",
      "default": null
    }
  },
  "required": [
    "type"
  ]
}
```
