HextaUI

Date picker: Disabled

A disabled trigger can still show a value.

import { DatePicker } from "@/components/ui/date-picker"

export function DatePickerDisabled() {
  return (
    <div className="flex flex-wrap justify-center gap-2">
      <DatePicker disabled />
      <DatePicker disabled defaultValue={new Date(2026, 0, 1)} />
    </div>
  )
}

This adds the example as components/examples/date-picker/disabled.tsx, together with the Date picker component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/date-picker-disabled.json

To add only the component, follow the Date picker installation.

Props in this example

The Date picker props this example sets, from the API reference.

PropTypeDefault
defaultValue
Date | nullnull
disabled
booleanfalse

Every prop is in the Date picker API reference.

See them all, with keyboard support and accessibility notes, on the Date picker page.