inputs/DSDatePicker
DSDatePicker
inputsDate (and optional time) picker with a calendar grid popover. Wraps the native DatePicker with DS token styling.
iOS 17+macOS 14+
Purpose
Date selection in forms: booking dates, deadlines, birthdays, scheduled tasks.
Interactive Reference
Live showroom
Need the full visual surface?
Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().
Best for exploring:
variants, states, categories, and real app examples in one place.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| selectionreq | Binding<Date> | โ | Bound date value. |
| label | String? | nil | Field label. |
| displayedComponents | DatePickerComponents | .date | .date, .hourAndMinute, or both. |
| range | ClosedRange<Date>? | nil | Restricts selectable dates. |
| placeholder | String | "Select a date" | Placeholder before a date is chosen. |
Examples
Task deadline picker
Date field in a task creation form.
swift
DSDatePicker(
selection: $taskDeadline,
label: "Due date",
range: Date.now...,
displayedComponents: .date
)