HextaUI

Date picker (UI SDK): Min, max and unavailable dates

min, max and unavailable apply to typing and picking. Here weekends and two holidays can’t be picked, and a typed one is marked invalid.

MM/DD/YYYY
import {
  DatePicker,
  DatePickerContent,
  DatePickerControl,
  DatePickerHint,
  DatePickerInput,
  DatePickerTrigger,
} from "@/components/ui/ui-sdk-date-picker"

function UiSdkDatePickerLimits() {
  return (
    <DatePicker
      min="2026-11-02"
      max="2026-12-18"
      unavailable={[{ weekday: [0, 6] }, "2026-11-26", "2026-11-27"]}
      defaultMonth="2026-11"
      className="max-w-56"
    >
      <DatePickerControl>
        <DatePickerInput aria-label="Delivery date" />
        <DatePickerTrigger />
      </DatePickerControl>
      <DatePickerHint />
      <DatePickerContent />
    </DatePicker>
  )
}

export { UiSdkDatePickerLimits }

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

pnpm dlx shadcn@latest add https://hextaui.com/r/ui-sdk-date-picker-limits.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
min
string–
max
string–
unavailableISO dates, { from, to }, { weekday }, { before }, { after } or a function.
DateMatchers–

Every prop is in the Date picker API reference.

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