Skip to content

Date Field

Edit and validate a timezone-free calendar date as structured text.

Usage

Iso date

Edit a timezone-free civil date using an ISO-shaped value.

Selected dateAug 22, 2026

Bounded

Reject values outside the configured minimum and maximum.

Selected dateAug 22, 2026

Controlled

Let the parent own the current value and apply accepted changes back to the component.

Selected dateAug 22, 2026

API

Vue package: @sectile/vue/temporal/date-field

Components
  • DateField

Props

DateFieldProps

defaultValue

Initial value used when the component owns its state.

disabled

Whether interaction is unavailable.

label

Accessible name announced for the control.

modelValue

Current value when state is controlled by the parent.

native

Whether to use the browser native date or time input UI.

policies

Behavior policies that customize validation, movement, or selection.

readonly

Whether the value can be inspected but not changed.

required

Whether the control must contain a valid value before submission.

Other types

DateValue

ts
type DateValue = NonNullable<DateFieldOptions['value']>

DateFieldValueChangeHandler

ts
type DateFieldValueChangeHandler = (value: DateValue | null) => void

Parts

Shared scope: [data-scope="date-field"]. Combine it with a part selector to keep styles local to this component.

PartSelectorRoleExtra attributes
input[data-part="input"]Accepts the editable value or draft.

Keyboard interaction

KeyBehavior
Arrow Up / Arrow DownIncrement or decrement the active value segment.
EnterCommit the draft value.
EscapeCancel the draft and restore the accepted value.

Accessibility

The labeled input preserves native text entry while announcing invalid, disabled, and readonly state.

Released under the MIT License.