# DatePickerProps (@salmonui/calendars/date-picker)

> The DatePickerProps interface of @salmonui/calendars/date-picker.

Canonical: https://salmonui.dev/docs/reference/calendars/date-picker/DatePickerProps

```ts
import type { DatePickerProps } from '@salmonui/calendars/date-picker';
```

Entry index: https://salmonui.dev/docs/reference/calendars/date-picker (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/calendars/date-picker.md).

## Reference

Kind: interface

```ts
interface DatePickerProps extends PickerFieldProps, DatePickerCalendarProps {
    readonly value?: DateInput | null | undefined;
    readonly defaultValue?: DateInput | null | undefined;
    readonly onValueChange?: ((value: PlainDate | PlainDateTime | null, details: DatePickerValueChangeDetails) => void) | undefined;
    readonly granularity?: DatePickerGranularity | undefined;
    readonly min?: DateInput | null | undefined;
    readonly max?: DateInput | null | undefined;
    readonly format?: DateFormat | undefined;
    readonly inputFormats?: readonly string[] | undefined;
    readonly parse?: ParseFn | undefined;
    readonly placeholderValue?: DateInput | null | undefined;
    readonly timeStep?: number | undefined;
    readonly minTime?: TimeInput | null | undefined;
    readonly maxTime?: TimeInput | null | undefined;
    readonly localeText?: Partial<DatePickerLocaleText> | undefined;
    readonly ref?: Ref<PickerHandle> | undefined;
}
```

Members (64):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `readOnly` | `readOnly?: boolean;` | optional, inherited |  |
| `value` | `readonly value?: DateInput \| null \| undefined;` | optional | A `PlainDate` or `PlainDateTime` (what `onValueChange` passes), fields, an ISO string or a `Date` instant. |
| `defaultValue` | `readonly defaultValue?: DateInput \| null \| undefined;` | optional |  |
| `onValueChange` | `readonly onValueChange?: ((value: PlainDate \| PlainDateTime \| null, details: DatePickerValueChangeDetails) => void) \| undefined;` | optional | `PlainDate` for `'year' \| 'month' \| 'day'`, `PlainDateTime` for `'hour' \| 'minute' \| 'second'`. |
| `granularity` | `readonly granularity?: DatePickerGranularity \| undefined;` | optional | Deepest segment; also the deepest calendar view and the time part. Default `'day'`. |
| `min` | `readonly min?: DateInput \| null \| undefined;` | optional |  |
| `max` | `readonly max?: DateInput \| null \| undefined;` | optional |  |
| `format` | `readonly format?: DateFormat \| undefined;` | optional | Display format of the field: `Intl` options, a skeleton (`'yMMMd'`) or a pattern (`'dd/MM/yyyy'`); the segments follow it. |
| `inputFormats` | `readonly inputFormats?: readonly string[] \| undefined;` | optional | Extra patterns accepted when typing over or pasting a whole value. |
| `parse` | `readonly parse?: ParseFn \| undefined;` | optional | Custom text parser for paste. |
| `placeholderValue` | `readonly placeholderValue?: DateInput \| null \| undefined;` | optional | Segment seed and popup position without a value. |
| `timeStep` | `readonly timeStep?: number \| undefined;` | optional | Minutes between time list options (default 30). |
| `minTime` | `readonly minTime?: TimeInput \| null \| undefined;` | optional | Daily time window. |
| `maxTime` | `readonly maxTime?: TimeInput \| null \| undefined;` | optional |  |
| `localeText` | `readonly localeText?: Partial<DatePickerLocaleText> \| undefined;` | optional |  |
| `ref` | `readonly ref?: Ref<PickerHandle> \| undefined;` | optional |  |
| `firstDayOfWeek` | `firstDayOfWeek?: number;` | optional, inherited |  |
| `showWeekNumbers` | `showWeekNumbers?: boolean;` | optional, inherited |  |
| `weekRule` | `weekRule?: WeekRule;` | optional, inherited |  |
| `weekdayFormat` | `weekdayFormat?: WeekdayFormat;` | optional, inherited |  |
| `calendar` | `calendar?: string;` | optional, inherited | `Intl` calendar id (`'gregory'`, `'islamic-umalqura'`, `'japanese'`, ...). |
| `showTodayButton` | `showTodayButton?: boolean;` | optional, inherited |  |
| `showOutsideDays` | `showOutsideDays?: boolean;` | optional, inherited |  |
| `isDateDisabled` | `isDateDisabled?: ((date: PlainDate) => boolean);` | optional, inherited |  |
| `renderDay` | `renderDay?: ((ctx: CalendarDayContext) => ReactNode);` | optional, inherited |  |
| `getDayProps` | `getDayProps?: ((ctx: CalendarDayContext) => CalendarDayProps \| undefined);` | optional, inherited |  |
| `view` | `view?: CalendarView;` | optional, inherited |  |
| `defaultView` | `defaultView?: CalendarView;` | optional, inherited |  |
| `onViewChange` | `onViewChange?: ((view: CalendarView) => void);` | optional, inherited |  |
| `focusedValue` | `focusedValue?: DateInput;` | optional, inherited |  |
| `defaultFocusedValue` | `defaultFocusedValue?: DateInput;` | optional, inherited |  |
| `onFocusedValueChange` | `onFocusedValueChange?: ((date: PlainDate) => void);` | optional, inherited |  |
| `open` | `open?: boolean;` | optional, inherited |  |
| `defaultOpen` | `defaultOpen?: boolean;` | optional, inherited |  |
| `onOpenChange` | `onOpenChange?: ((open: boolean, details: PickerOpenChangeDetails) => void);` | optional, inherited |  |
| `popupMode` | `popupMode?: PopupMode;` | optional, inherited |  |
| `disabled` | `disabled?: boolean;` | optional, inherited |  |
| `openOnFocus` | `openOnFocus?: boolean;` | optional, inherited | Opens the popup when focus enters the field. |
| `editable` | `editable?: boolean;` | optional, inherited | `false` makes the segments read-only; a click on the field opens the popup. |
| `clearable` | `clearable?: boolean;` | optional, inherited | Renders a clear button. |
| `onClear` | `onClear?: (() => void);` | optional, inherited |  |
| `strict` | `strict?: boolean;` | optional, inherited | Out-of-range values move to the nearest bound and disabled or unparsable input reverts on blur. |
| `required` | `required?: boolean;` | optional, inherited |  |
| `invalid` | `invalid?: boolean;` | optional, inherited |  |
| `label` | `label?: ReactNode;` | optional, inherited |  |
| `description` | `description?: ReactNode;` | optional, inherited |  |
| `errorMessage` | `errorMessage?: ReactNode;` | optional, inherited |  |
| `placeholder` | `placeholder?: string;` | optional, inherited | Watermark shown while empty and not focused. |
| `name` | `name?: string;` | optional, inherited |  |
| `form` | `form?: string;` | optional, inherited |  |
| `autoFocus` | `autoFocus?: boolean;` | optional, inherited |  |
| `onFocus` | `onFocus?: ((event: FocusEvent<Element, Element>) => void);` | optional, inherited | Focus entered the field group (once). |
| `onBlur` | `onBlur?: ((event: FocusEvent<Element, Element>) => void);` | optional, inherited | Focus left the field group and its popup (once). |
| `onInvalid` | `onInvalid?: (() => void);` | optional, inherited | The form value input failed constraint validation. |
| `locale` | `locale?: string;` | optional, inherited | BCP 47 locale; default `'en-US'`. |
| `timeZone` | `timeZone?: string;` | optional, inherited | IANA time zone for instant values (`Date`, ISO with an offset). |
| `hourCycle` | `hourCycle?: "h12" \| "h23";` | optional, inherited |  |
| `size` | `size?: "lg" \| "md" \| "sm";` | optional, inherited | Control size: `'sm'` 24px, `'md'` 32px (default), `'lg'` 40px tall. |
| `id` | `id?: string;` | optional, inherited |  |
| `className` | `className?: string;` | optional, inherited |  |
| `style` | `style?: CSSProperties;` | optional, inherited |  |
| `aria-label` | `aria-label?: string;` | optional, inherited |  |
| `aria-labelledby` | `aria-labelledby?: string;` | optional, inherited |  |
| `aria-describedby` | `aria-describedby?: string;` | optional, inherited |  |
