Skip to main content
Date picker calendar.
{
  "type": "object",
  "properties": {
    "type": {
      "const": "Calendar",
      "default": "Calendar",
      "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."
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "State key for reactive binding. Auto-generated if omitted."
    },
    "value": {
      "anyOf": [
        {
          "format": "date",
          "type": "string"
        },
        {
          "additionalProperties": {
            "format": "date",
            "type": "string"
          },
          "type": "object"
        },
        {
          "items": {
            "format": "date",
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Initial selected date(s). Single: a date or Rx. Range: {'from': date, 'to': date}. Multiple: list of dates. Any position accepts an Rx for reactive binding."
    },
    "mode": {
      "default": "single",
      "description": "Selection mode: single date, multiple dates, or date range",
      "enum": [
        "single",
        "multiple",
        "range"
      ],
      "type": "string"
    },
    "onChange": {
      "$ref": "Action",
      "description": "Action(s) when selection changes",
      "default": null
    }
  },
  "required": [
    "type"
  ]
}