Initializer

init(_:selection:displayedComponents:)

Creates an instance that selects a Date within the given range. あるインスタンスを作成します、それは与えられた範囲でのあるDateを選択します。

Declaration 宣言

init<S>(_ title: S, selection: Binding<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date]) where S : StringProtocol
Available when Label is Text. LabelTextである時に利用可能です。

Parameters パラメータ

title

The title of self, describing its purpose.

selection

The date value being displayed and selected. 表示および選択されている日付値。

displayedComponents

The date components that user is able to view and edit. Defaults to [.hourAndMinute, .date]. ユーザが閲覧および編集できる日付構成要素。省略時には[.hourAndMinute, .date]です。

See Also 参照

Creating a Date Picker for Any Date