Quaff

QDate

Date pickers support single dates and ranges through a calendar or text entry. Display them in a dialog or anchored popup.

LIGHTBOX RENTALS

A few days in analogue

A 35 mm camera and a 50 mm lens, ready to go.

4 days · €24 / day €96
info QDate API Source

interface QDateProps<Range extends boolean = false> extends Pick<Omit<HTMLInputAttributes, "value" | "disabled">, "aria-describedby" | "aria-label" | "id" | "tabindex">

autoApply
?: boolean = false
Commits and closes after a date or a complete valid range is selected.

cancelLabel
?: string = undefined
Modal cancellation action label.

class
?: HTMLAttributes<HTMLDivElement>["class"] = undefined
Classes applied to the field wrapper.

confirmLabel
?: string = undefined
Modal confirmation action label.

defaultMode
?: QDateDisplayMode = "calendar"
Mode shown when a modal picker opens.

dense
?: boolean = false
Makes the input component more compact.

disabled
?: boolean = false
Puts the component into a disabled state, which prevents user interaction.

disabledDates
?: QDateDisabledDates = undefined
Dates to disable as YYYY-MM-DD values or a predicate.

error
?: boolean = false
Indicates an error state for the input.

errorMessage
?: string = undefined
Message to display when the input is in an error state. Overrides the hint prop when the input is in an error state.

filled
?: boolean = false
Applies a filled background style to the input.

firstDayOfWeek
?: QDateWeekday = undefined
Overrides the locale's first weekday. Zero is Sunday.

hint
?: string = undefined
Helper text displayed below the input. When the input is in an error state, the helper text will be overwritten by the error message.

inputTitle
?: string = undefined
Empty headline in modal text-input mode.

label
?: string = undefined
The text to be displayed in the component. When applicable, will overwrite the children snippet content.

labels
?: Partial<QDateLabels> = undefined
Overrides the shared translations for accessible labels and validation messages.

locale
?: string = undefined
BCP 47 locale for date formatting and the first weekday. Defaults to Quaff.init() locale.

mask
?: string = "YYYY-MM-DD"
Model format containing one each of YYYY, MM, and DD.

max
?: string = undefined
Latest selectable date, inclusive, in YYYY-MM-DD format.

min
?: string = undefined
Earliest selectable date, inclusive, in YYYY-MM-DD format.

open
?: boolean = $bindable(false)
Whether the picker overlay is open. This property is bindable.

outlined
?: boolean = false
Applies an outlined style to the input.

range
?: Range = false
Selects an inclusive date range. The bound value is { start, end }, with both dates using the model mask. A range cannot include disabled dates.

readonly
?: boolean = false
Prevents the picker from opening.

rounded
?: boolean = false
Makes the sides of the input round.

saveLabel
?: string = undefined
Full-screen save action label.

showModeToggle
?: boolean = true
Shows the modal calendar/text-input toggle.

style
?: HTMLAttributes<HTMLDivElement>["style"] = undefined
Styles applied to the field wrapper.

title
?: string = undefined
Supporting title above the modal calendar.

validationMessage
?: string = $bindable("")
Validation message for the bound value. This property is bindable.

value
?: QDateValue<Range> = $bindable(undefined)
The bound value of the component.

variant
?: QDateVariant = "modal"
Picker presentation. Adaptive uses docked at the shared sm breakpoint and a full-screen modal below it.

yearRange
?: readonly [number, number] = [1900, 2100]
Inclusive range of selectable years.

Usage

Date Ranges

Set range and bind an object with start and end dates, or null. Both endpoints use the model mask, which defaults to YYYY-MM-DD.

Select a start, then the same day or a later end. Choosing an earlier day restarts the range. The calendar highlights both endpoints and the days between them.

Build your camera kit

35 mm camera + 50 mm lens

Add a light meter · €4 / day
Collection
9 Oct 2026
Return
12 Oct 2026
4 rental days
€96

Collection and return days are included in this estimate.

Text Input
Open a modal directly in text entry with defaultMode="input". Ranges show separate start and end fields. Users can switch between calendar and text entry unless showModeToggle is false. The input format follows locale.
Dates already in your brief?

Enter your studio booking.

4 days reserved in your plan
Date Constraints

Limit dates with min, max, yearRange, and disabledDates (an array or predicate). Constraint values always use YYYY-MM-DD, regardless of the model mask.

Every day in a range must be available, including the endpoints. A range crossing a disabled date cannot be confirmed.

Medium format, limited availability

October 2026 rental calendar

In the workshop 14–16 October. Rentals must fit either side of maintenance.

Your plan: 19 Oct 2026 – 22 Oct 2026

Docked and Adaptive

Use variant="docked" inside QInput's append snippet for an anchored picker. adaptive uses the same presentation at sm and above, then a full-screen modal on smaller screens.

Composed inputs control their own labels, masks, and errors. For a range, bind each input to one endpoint and pass the complete object to QDate. Bind validationMessage to show validation in the surrounding fields.

DOCKED · SINGLE DATE
Lens collection
DD.MM.YYYY

Ready at the counter: 16 Oct 2026

ADAPTIVE · DATE RANGE
A weekend with a wide-angle
YYYY-MM-DD
YYYY-MM-DD

4 days with the wide-angle lens

Single Dates
Without range, the model remains a date string or null. The default modal variant renders its own field and becomes full-screen on small screens.
Your negatives are ready

Two rolls, 72 little moments.

Collection pencilled in for 20 Oct 2026.

Formatting and Localization

QDate's mask controls the stored model; a composed QInput uses its own input mask. Keep their date order consistent, as in the docked example. locale controls display formatting, text entry, and the default first weekday. firstDayOfWeek overrides it, with Sunday as 0.

Switch languages to translate the picker labels, actions, and validation messages. See available locales for setup instructions.

A camera for your next trip
Programmatic Control and Labels
Bind open or call show(), hide(), and toggle(). Customize the titles, action labels, or individual accessible labels with labels. Both disabled and readonly prevent opening.
RENTAL REQUEST #024
Fine-tune your collection dates

Your chosen dates are saved in this plan

Selection and Validation

Selections remain drafts until confirmed. Cancel and Escape leave the model unchanged. With autoApply, a single date commits immediately; a range commits only after both endpoints form a valid selection.

Validation distinguishes invalid dates, unavailable dates, reversed ranges, and ranges containing unavailable days. Customize these messages with labels.invalidDate, labels.unavailableDate, labels.invalidRange, and labels.unavailableRange.

Keyboard Navigation
Arrow keys move by day or week. Page Up and Page Down change months; add Shift to change years. Enter or Space selects a date or range endpoint. Escape closes without applying the draft, and focus returns to the trigger.