inputs/DSDatePicker

DSDatePicker

inputs
since 0.1.0

Date (and optional time) picker with a calendar grid popover. Wraps the native DatePicker with DS token styling.

iOS 17+macOS 14+watchOS 10+tvOS 17+visionOS 1+

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

PropTypeDefaultDescription
labelString?nilField label.
selectionreqBinding<Date>โ€”Bound date value.
displayedComponentsDatePickerComponents.date.date, .hourAndMinute, or both.
inClosedRange<Date>?nilRestricts selectable dates (argument label in:).
accessibilityLabelString?nilVoiceOver label override.

Examples

Task deadline picker

Only allows dates in the next 90 days.

swift
DSDatePicker(
    label: "Due date",
    selection: $taskDeadline,
    displayedComponents: .date,
    in: Date.now...Date.now.addingTimeInterval(90 * 24 * 3600)
)

Related Components