Skip to content

DatePicker

A controlled native date or date-and-time picker.

#Import

Import DatePicker from @quickgui/solid/swift-ui.

import { Host, DatePicker } from "@quickgui/solid/swift-ui";

#Usage

<Host matchContents>
  <DatePicker
    label="Schedule"
    value={scheduledAt()}
    displayedComponents="dateAndTime"
    style="field"
    onValueChange={setScheduledAt}
  />
</Host>

#API reference

Expand an entry for its description and complete signature. A dash means no declaration default is documented.

DatePicker

View source
DatePicker(props: DatePickerProps): NativeNode
testIDstring—

Stable identifier exposed to macOS accessibility and UI testing.

string
View source
modifiersViewModifier[]—

SwiftUI modifiers, applied in array order.

ViewModifier[]
View source
valueDate—

Controlled JavaScript date.

Date
View source
minDate—

Declares min (optional). Reactive JSX expressions update this property in place.

Date
View source
maxDate—

Declares max (optional). Reactive JSX expressions update this property in place.

Date
View source
labelstring—

Declares label (optional). Reactive JSX expressions update this property in place.

string
View source
displayedComponentsDatePickerComponents—

Declares displayedComponents (optional). Reactive JSX expressions update this property in place.

DatePickerComponents
View source
styleDatePickerStyle—

Layout, typography, paint, and interaction-state styles. Arrays merge left to right.

DatePickerStyle
View source
onValueChange(value: Date, event: QuickGuiEvent) => void—

Declares onValueChange (optional). Reactive JSX expressions update this property in place.

(value: Date, event: QuickGuiEvent) => void
View source
ref((node: NativeNode) => void) | NativeNode—

Declares ref (optional). Reactive JSX expressions update this property in place.

((node: NativeNode) => void) | NativeNode
View source