Skip to content

DateField

Defined in: packages/core/src/fields/date/types.ts:116

Resolved configuration for a date() field, after all defaults are applied.

This is the type that framework adapters and field components receive — fieldDef in InputComponentProps<DateField> and CellComponentProps<DateField> is this type.

  • DateFieldInput for the user-facing input type
  • date for the config function that produces this type

TFieldMeta extends object = { }

admin: FieldAdminConfig

Defined in: packages/core/src/fields/date/types.ts:123

Resolved admin UI configuration with all defaults applied.

BaseField.admin


defaultValue: number | undefined

Defined in: packages/core/src/fields/date/types.ts:125

Pre-filled Unix timestamp (milliseconds) shown in the admin form when creating a new document.

BaseField.defaultValue


optional description?: string

Defined in: packages/core/src/fields/baseTypes.ts:252

Semantic description of the field. Used in three places:

  1. Helper text rendered below the field input in the admin form UI.
  2. As the Zod .meta({ description }) value for form validation.
  3. As the JSDoc comment on the generated document interface property.

To write a separate JSDoc comment, use interfaceDescription in addition.

BaseField.description


optional index?: string

Defined in: packages/core/src/fields/baseTypes.ts:256

Convex index name for this field.

BaseField.index


optional interfaceDescription?: string

Defined in: packages/core/src/fields/baseTypes.ts:254

The JSDoc comment on the generated document interface property

BaseField.interfaceDescription


interfaceType: string

Defined in: packages/core/src/fields/baseTypes.ts:258

TypeScript type string written to generated document interfaces (e.g. "string", "number", "string[]").

BaseField.interfaceType


label: string

Defined in: packages/core/src/fields/date/types.ts:119

Display label shown in the admin form. Always set — inferred from the field key if not provided.

BaseField.label


optional max?: number

Defined in: packages/core/src/fields/date/types.ts:129

Maximum allowed Unix timestamp (milliseconds).


meta: TFieldMeta

Defined in: packages/core/src/fields/baseTypes.ts:259

BaseField.meta


optional min?: number

Defined in: packages/core/src/fields/date/types.ts:127

Minimum allowed Unix timestamp (milliseconds).


required: boolean

Defined in: packages/core/src/fields/date/types.ts:121

Whether this field is required in the database schema.

BaseField.required


time: object

Defined in: packages/core/src/fields/date/types.ts:135

Resolved date/time picker display configuration — all keys always present after defaults are applied.

hidden: boolean

Whether the time-of-day picker is hidden, leaving only the calendar date selector.

timePicker: object

Which time unit selectors are shown in the time picker.

hour: boolean

Whether the hour selector is shown.

minute: boolean

Whether the minute selector is shown.

second: boolean

Whether the seconds selector is shown.

use12HourFormat: boolean

Whether time is displayed in 12-hour AM/PM format (true) or 24-hour format (false).

DateFieldInput for the user-facing input type where each key is optional


readonly type: "date"

Defined in: packages/core/src/fields/date/types.ts:117