Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
FormsApple

Date range field

Select an inclusive native date range with coordinated bounds and validation context.

Public APILumenDateRangeFieldApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+

Native example

Use Date range field

Use for an inclusive native date range. Keep values controlled and provide product-specific validation copy when additional rules apply.

Date range field rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenDateRangeField(
    "Release window",
    start: $releaseStart,
    end: $releaseEnd,
    bounds: .from(.now),
    description: "Choose when this release is available."
)

Reference

Public API

The primary shared and platform-specific options exposed by LumenDateRangeField.

APIValues or typeDefaultDescription
titleLocalizedStringKeyRequiredLabels the inclusive date range.
start / endBinding<Date> pairRequiredStores the controlled start and end values.
boundsunbounded · closed · from · throughunboundedConstrains both dates using the native picker contract.
description / errorMessageLocalizedStringKey?nilShows supporting text or a semantic danger validation message.

Native behavior

Design and accessibility

When to use it

Use for an inclusive native date range. Keep values controlled and provide product-specific validation copy when additional rules apply.

Accessibility

The range and each native control remain labeled, and selection prevents an end date from preceding its start.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package