Time-of-day picker bound to a time attribute.
| Builder | F.time(attribute: string): TimeField |
| Wire type key | time |
| Class chain | TimeField → TemporalField → Field |
| Detail projection | text-entry |
| Column counterpart | date cell, i.e. C.date(attribute) |
Example
import { F } from '@adonia/core'
F.time('opensAt').label('Opens at').after('06:00:00').before('12:00:00')Props
Beyond the shared field DSL:
| Prop | Declared on | Behaviour |
|---|---|---|
timezone(zone: string): this |
TemporalField |
Timezone the civil parts of the value are resolved in (§7.3 “timezone = app tz”). An IANA name ('Europe/Paris') or 'UTC'; defaults to the app timezone. |
displayTimezone(zone: string): this |
TemporalField |
Timezone the CLIENT renders the value in (§7.3 “display tz configurable”). Presentation only — storage and validation are governed by TemporalField.timezone. |
after(value: string): this |
TemporalField |
Lower bound; compiles to Vine’s date.after (§11.1 “after/before from field rules”). Takes the subtype’s own wire form (2024-01-01, 2024-01-01T00:00:00.000Z, 09:00:00), plus Vine’s 'today' / 'tomorrow' keywords. |
before(value: string): this |
TemporalField |
Upper bound; compiles to Vine’s date.before (§11.1). |
Introspection
Read-only members this type adds — used by the compiler, the table derivation and tests rather than by a schema author.
| Member | Declared on | Behaviour |
|---|---|---|
get zone(): string |
TemporalField |
The effective timezone: the per-field override, else the app timezone. |
instantFor(record: unknown): DateTimeLike | undefined |
TemporalField |
The stored value as a Luxon instant, or undefined when the attribute is empty or Luxon is unreachable. Exposed for resources that need the instant rather than the wire string (e.g. a beforeSave comparison). |
Validation
Vine base: vine.date({ formats: parse }).
§11.1 mapping: vine.date() with the subtype’s parse formats, plus the
declared after/before bounds compared at the subtype’s granularity.
The bounds carry an explicit format so Vine parses the EXPECTED value
with the same shape as the submitted one — without it a 09:00:00
bound on a time field is read as a date and every comparison
collapses to “same day”.
Contributed by TemporalField.vineSchema() in packages/core/src/schema/fields/temporal.ts. The shared modifiers (required, nullable, requiredWhen, unique, optionality) are applied on top by Field.buildValidation, and a rules() override replaces the base entirely — the validator compiler never branches on the field class.
Declared in
packages/core/src/schema/fields/time.ts—TimeFieldpackages/core/src/schema/fields/temporal.ts—TemporalField