Skip to content

GhostDatePicker reference ​

Package: @ghostvue/vue. Status: experimental (stability policy).

Headless date-entry and selection root: strict ISO typed entry for a single date or inclusive range, an anchored modal calendar (APG Date Picker Dialog), separate drafts and committed CalendarDate values, native form serialization, validation, and reset.

Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.

All component references

Props ​

NameTypeDefaultRequiredDescription
defaultOpenbooleanfalseNoInitial uncontrolled open state.
defaultValueGhostDatePickerValuenullNoInitial uncontrolled value and uncontrolled form-reset target.
defaultVisibleMonthCalendarDate—NoMonth shown when the picker opens empty.
disabledbooleanfalseNoBlocks all interaction and closes the calendar.
endNamestring—NoRange end submission name override.
formstring—NoExternal `<form>` id for submission, validation, and reset.
formatGhostDatePickerFormat—NoSynchronous display formatter; defaults to ISO `YYYY-MM-DD`.
formatHintstring"YYYY-MM-DD"NoFormat description linked to every input.
invalidbooleanfalseNoConsumer-supplied invalid state (`external-invalid`).
isDateDisabled((date: CalendarDate) => boolean)—NoUnavailable endpoint dates (focusable, not selectable).
localestring"en-US"NoCalendar and formatting locale.
maxValueCalendarDate—NoInclusive upper bound.
minValueCalendarDate—NoInclusive lower bound.
modelValueGhostDatePickerValue—NoControlled committed value; `undefined` is uncontrolled, `null` is controlled empty.
namestring—NoForm name: `name` (single) or `name[start]` / `name[end]` (range).
openboolean—NoControlled requested open state.
parseGhostDatePickerParse—NoSynchronous parser; defaults to strict ISO `YYYY-MM-DD`.
readonlybooleanfalseNoKeeps text focusable and selectable but prevents editing, clearing, and opening.
requiredbooleanfalseNoNative required constraint on an empty committed value.
selectionModeGhostDatePickerSelectionMode"single"No`'single'` or `'range'`; fixed for the instance (remount with a new `key`).
startNamestring—NoRange start submission name override.
todayCalendarDate—NoExplicit current date for SSR-safe "today" styling and focus fallback.
validateRangeGhostDatePickerValidateRange—NoWhole-range business validation returning an error message or `null`.
validationMessage((error: GhostDatePickerError) => string)—NoLocalizes built-in error messages.
weekStartsOnGhostDatePickerWeekday—NoWeek start override (Sunday = `0`).

Emits ​

None declared.

Models ​

PropEventTypeDescription
modelValueupdate:modelValueGhostDatePickerValuev-model binding for `modelValue`.
openupdate:openbooleanv-model binding for `open`.

Slots ​

NameDescription
defaultContainer content.

Slot props: default ​

NameTypeDescription
clear() => voidSlot prop `clear`.
close() => voidSlot prop `close`.
errorsGhostDatePickerError[]Slot prop `errors`.
openbooleanSlot prop `open`.
openCalendar() => voidSlot prop `openCalendar`.
pendingbooleanSlot prop `pending`.
valueGhostDatePickerValueSlot prop `value`.

Exposed members ​

None declared.

Parts and data attributes ​

AttributeValueDescription
data-partinputNative text input from GhostDatePickerInput (data-input-part single/start/end).
data-parttriggerNative button from GhostDatePickerTrigger that opens the calendar dialog.
data-partcontentPositioned modal dialog surface from GhostDatePickerContent.
data-partcloseBuilt-in Close control inside the content.
data-parterror-summaryFocusable in-dialog error summary shown after an invalid event while open.
data-partstatusPolite status line for the range instruction and calendar validation feedback.
data-partformat-hintVisually hidden format description linked to every input.
data-parterror-descriptionVisually hidden per-input error text linked while errors are shown.
data-stateopenTrigger data-state while the calendar dialog is open.
data-stateinvalidInput data-state when it has errors or the consumer marked it invalid.
data-statedisabledInput data-state when disabled.
data-statereadonlyInput data-state when readonly.

CSS variables ​

None declared.

Accessibility ​

Role: dialog. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/datepicker-dialog/.

Required ARIA attributes: aria-haspopup, aria-expanded, aria-controls, aria-modal, aria-describedby, aria-invalid, aria-selected.

Keyboard ​

KeyActionAutomated browser test
EnterIn an edited input, commits the text and prevents implicit form submission. On the trigger, opens the calendar. On a date, selects it.Not reviewed
SpaceOn the trigger, opens the calendar. On a date, selects it.Not reviewed
EscapeIn the open dialog, closes it without committing calendar progress and restores focus. In an edited closed input, restores the committed text.Not reviewed
TabCycles through the dialog controls; the grid is a single Tab stop.Not reviewed
Shift+TabCycles backward through the dialog controls.Not reviewed
ArrowLeftPrevious day (next day in RTL).Not reviewed
ArrowRightNext day (previous day in RTL).Not reviewed
ArrowUpSame day previous week.Not reviewed
ArrowDownSame day next week.Not reviewed
HomeFirst day of the week.Not reviewed
EndLast day of the week.Not reviewed
PageUpSame day previous month.Not reviewed
PageDownSame day next month.Not reviewed
Shift+PageUpSame day previous year.Not reviewed
Shift+PageDownSame day next year.Not reviewed

Verification ​

Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.

CategoryStatusEvidence
Automated keyboardNot reviewedNo declared key is mapped to a browser test yet.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

date-picker/basic ​

Example source

Basic Headless

Single date with typed ISO entry and an anchored modal calendar.

YYYY-MM-DDNo date

date-picker/range ​

Example source

Range Headless

Start and end inputs in a named group; two calendar activations commit atomically.

Stay datesYYYY-MM-DD