Skip to main content

FormDateTimeInput

Stentor API Reference


Stentor API Reference / stentor-models/src / FormDateTimeInput

Interface: FormDateTimeInput

Defined in: packages/stentor-models/src/Form/FormField.ts:569

Combined date and appointment time picker.

Renders a calendar beside a column of appointment times generated from schedule, so the times on offer follow the date the user picks. A single field owns both values, but it submits them separately: the chosen time under the field's own name (plus the _start/_end members a selectable item already contributes), the date under dateFieldName, and a combined offset-bearing ISO timestamp under dateTimeFieldName.

Extends​

Properties​

name​

name: string

Defined in: packages/stentor-models/src/Form/FormField.ts:81

Name of the form input, this is not human readable and is used to identify the field.

For example: "SERVICE" or "FULL_NAME"

Inherited from​

FormInput.name


title?​

optional title?: string

Defined in: packages/stentor-models/src/Form/FormField.ts:85

Optional title used to display on the input

Inherited from​

FormInput.title


shape?​

optional shape?: "ROUND" | "SQUARE"

Defined in: packages/stentor-models/src/Form/FormField.ts:93

Optional, used to shape the input. Not applicable to all inputs.

Inherited from​

FormInput.shape


condition?​

optional condition?: string

Defined in: packages/stentor-models/src/Form/FormField.ts:100

A condition that must be met for the field to be shown.

For example: "issue === 'service_repair'" - issue is a field name in this example

Inherited from​

FormInput.condition


mandatory?​

optional mandatory?: boolean

Defined in: packages/stentor-models/src/Form/FormField.ts:104

Is the field required.

Inherited from​

FormInput.mandatory


mandatoryError?​

optional mandatoryError?: string

Defined in: packages/stentor-models/src/Form/FormField.ts:108

Error message to show when the field is required but not filled out.

Inherited from​

FormInput.mandatoryError


mandatoryGroup?​

optional mandatoryGroup?: string

Defined in: packages/stentor-models/src/Form/FormField.ts:112

Group fields together where one of the fields in the group is required.

Inherited from​

FormInput.mandatoryGroup


style?​

optional style?: object

Defined in: packages/stentor-models/src/Form/FormField.ts:118

React.CSSProperties style object to apply to the field.

For example: {{ width: '300px', height: '150px' }}

Inherited from​

FormInput.style


type​

type: "DATETIME"

Defined in: packages/stentor-models/src/Form/FormField.ts:570

Type of the input

Overrides​

FormInput.type


schedule​

schedule: TimeSlotSchedule

Defined in: packages/stentor-models/src/Form/FormField.ts:574

Which appointment times to offer.


dateFieldName?​

optional dateFieldName?: string

Defined in: packages/stentor-models/src/Form/FormField.ts:578

Field name the selected date is submitted under. Defaults to "preferred_date".


dateTimeFieldName?​

optional dateTimeFieldName?: string

Defined in: packages/stentor-models/src/Form/FormField.ts:583

Field name the combined date and time is submitted under, as an ISO 8601 string carrying the schedule's UTC offset. Defaults to "datetime".