inputs/DSDatePicker

DSDatePicker

inputs
since v2.0

Date (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

PropTypeDefaultDescription
selectionreqBinding<Date>โ€”Bound date value.
labelString?nilField label.
displayedComponentsDatePickerComponents.date.date, .hourAndMinute, or both.
rangeClosedRange<Date>?nilRestricts selectable dates.
placeholderString"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
)

Related Components