# Date picker (UI SDK): Disabled and read-only

> `disabled` stops typing and opening. `readOnly` still opens the calendar so people can look, but nothing can change.

Canonical: https://hextaui.com/docs/ui-sdk-date-picker/examples/disabled

Component docs: https://hextaui.com/docs/ui-sdk-date-picker

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/ui-sdk-date-picker-disabled.json
```

This adds `components/examples/ui-sdk-date-picker/disabled.tsx` with the Date picker component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/ui-sdk-date-picker/disabled.tsx"
import {
  DatePicker,
  DatePickerContent,
  DatePickerControl,
  DatePickerInput,
  DatePickerTrigger,
} from "@/components/ui/ui-sdk-date-picker"

function UiSdkDatePickerDisabled() {
  return (
    <div className="flex w-full max-w-56 flex-col gap-3">
      <DatePicker defaultValue="2026-11-20" disabled>
        <DatePickerControl>
          <DatePickerInput aria-label="Disabled date" />
          <DatePickerTrigger />
        </DatePickerControl>
        <DatePickerContent />
      </DatePicker>
      <DatePicker defaultValue="2026-11-20" readOnly>
        <DatePickerControl>
          <DatePickerInput aria-label="Read-only date" />
          <DatePickerTrigger />
        </DatePickerControl>
        <DatePickerContent />
      </DatePicker>
    </div>
  )
}

export { UiSdkDatePickerDisabled }
```

## Props in this example

### DatePicker

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValue` | `string \| [string, string] \| null` | – |  |
| `disabled` | `boolean` | `false` |  |
| `readOnly` | `boolean` | `false` |  |

## More Date picker examples

- [Range](https://hextaui.com/docs/ui-sdk-date-picker/examples/range)
- [Presets](https://hextaui.com/docs/ui-sdk-date-picker/examples/presets)
- [Min, max and unavailable dates](https://hextaui.com/docs/ui-sdk-date-picker/examples/limits)
- [Language](https://hextaui.com/docs/ui-sdk-date-picker/examples/locale)
- [Form](https://hextaui.com/docs/ui-sdk-date-picker/examples/form)
- [Controller](https://hextaui.com/docs/ui-sdk-date-picker/examples/controller)
- [Right to left](https://hextaui.com/docs/ui-sdk-date-picker/examples/rtl)
