# FieldBaseProps (@salmonui/calendars/date-field)

> The FieldBaseProps interface of @salmonui/calendars/date-field: Props shared by DateField and TimeField.

Canonical: https://salmonui.dev/docs/reference/calendars/date-field/FieldBaseProps

```ts
import type { FieldBaseProps } from '@salmonui/calendars/date-field';
```

Also exported from `@salmonui/calendars/date-picker`, `@salmonui/calendars/time-picker`.

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

## Reference

Kind: interface

```ts
interface FieldBaseProps extends GroupProps {
    readonly ref?: Ref<HTMLDivElement>;
    readonly size?: 'sm' | 'md' | 'lg' | undefined;
    readonly label?: ReactNode;
    readonly description?: ReactNode;
    readonly errorMessage?: ReactNode;
    readonly format?: DateFormat;
    readonly hourCycle?: HourCycle;
    readonly locale?: string;
    readonly timeZone?: string;
    readonly inputFormats?: readonly string[];
    readonly parse?: ParseFn;
    readonly strict?: boolean;
    readonly disabled?: boolean;
    readonly readOnly?: boolean;
    readonly required?: boolean;
    readonly invalid?: boolean;
    readonly autoFocus?: boolean;
    readonly name?: string;
    readonly form?: string;
    readonly onFocus?: (event: FocusEvent<HTMLDivElement>) => void;
    readonly onBlur?: (event: FocusEvent<HTMLDivElement>) => void;
    readonly localeText?: Partial<FieldLocaleText>;
    readonly dir?: 'ltr' | 'rtl';
}
```

Props shared by `DateField` and `TimeField`.

Members (23):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `ref` | `readonly ref?: Ref<HTMLDivElement>;` | optional |  |
| `size` | `readonly size?: 'sm' \| 'md' \| 'lg' \| undefined;` | optional | Control size: `'sm'` 24px, `'md'` 32px (default), `'lg'` 40px tall; `data-size` on the group. |
| `label` | `readonly label?: ReactNode;` | optional | Visible label above the segments; also names the group. |
| `description` | `readonly description?: ReactNode;` | optional |  |
| `errorMessage` | `readonly errorMessage?: ReactNode;` | optional | Shown when `invalid` (or a complete value is out of range / disabled). |
| `format` | `readonly format?: DateFormat;` | optional | Display format: `Intl` options, a CLDR skeleton (`'yMMMd'`) or a pattern (`'dd/MM/yyyy'`, `'HH:mm'`); the segments follow it. |
| `hourCycle` | `readonly hourCycle?: HourCycle;` | optional | `'h12'` or `'h23'`; default from the locale. |
| `locale` | `readonly locale?: string;` | optional | BCP 47 locale. Default `'en-US'`; the host locale is never read. |
| `timeZone` | `readonly timeZone?: string;` | optional | IANA zone for `Date` and offset inputs, and `details.epochMilliseconds`. |
| `inputFormats` | `readonly inputFormats?: readonly string[];` | optional | Extra accepted paste and typed formats (patterns); ISO is always accepted. |
| `parse` | `readonly parse?: ParseFn;` | optional | Custom text parser, tried last. |
| `strict` | `readonly strict?: boolean;` | optional | `false` (default): an out-of-range or disabled value is kept and the field is `aria-invalid`. `true`: on blur, incomplete or disabled input reverts to the last valid value and an out-of-range value moves to the nearest bound. |
| `disabled` | `readonly disabled?: boolean;` | optional |  |
| `readOnly` | `readonly readOnly?: boolean;` | optional |  |
| `required` | `readonly required?: boolean;` | optional |  |
| `invalid` | `readonly invalid?: boolean;` | optional |  |
| `autoFocus` | `readonly autoFocus?: boolean;` | optional |  |
| `name` | `readonly name?: string;` | optional | Form field name: a visually hidden input posts the ISO value. |
| `form` | `readonly form?: string;` | optional |  |
| `onFocus` | `readonly onFocus?: (event: FocusEvent<HTMLDivElement>) => void;` | optional | Fires once when focus enters the group. |
| `onBlur` | `readonly onBlur?: (event: FocusEvent<HTMLDivElement>) => void;` | optional | Fires once when focus leaves the group. |
| `localeText` | `readonly localeText?: Partial<FieldLocaleText>;` | optional |  |
| `dir` | `readonly dir?: 'ltr' \| 'rtl';` | optional | Direction override; inherited from the document by default. |
