DateTimePickerConfiguration
public struct DateTimePickerConfiguration
Undocumented
-
Undocumented
Declaration
Swift
public var componentIdentifier: String -
Undocumented
Declaration
Swift
public let title: Title -
Undocumented
Declaration
Swift
public let valueLabel: ValueLabel -
Undocumented
Declaration
Swift
public let controlState: ControlState -
Undocumented
Declaration
Swift
public let errorMessage: AttributedString? -
Undocumented
Declaration
Swift
public let range: ClosedRange<Date>? -
Undocumented
Declaration
Swift
@Binding public var selectedDate: Date? { get nonmutating set } -
Undocumented
Declaration
Swift
public let dateFormatter: DateFormatter? -
Undocumented
Declaration
Swift
public let pickerComponents: DatePicker.Components -
Undocumented
Declaration
Swift
public let dateStyle: Date.FormatStyle.DateStyle -
Undocumented
Declaration
Swift
public let timeStyle: Date.FormatStyle.TimeStyle -
Undocumented
Declaration
Swift
public let noDateSelectedString: String? -
Undocumented
Declaration
Swift
@Binding public var pickerVisible: Bool { get nonmutating set } -
Undocumented
Declaration
Swift
public let hidesSeparator: Bool -
Undocumented
Declaration
Swift
public let showsClearAction: Bool -
Undocumented
Declaration
Swift
public let clearAction: ClearAction -
Undocumented
Declaration
Swift
public typealias Title = ConfigurationViewWrapper -
Undocumented
Declaration
Swift
public typealias ValueLabel = ConfigurationViewWrapper -
Undocumented
Declaration
Swift
public typealias ClearAction = ConfigurationViewWrapper -
init(title:valueLabel: controlState: errorMessage: range: selectedDate: dateFormatter: pickerComponents: dateStyle: timeStyle: noDateSelectedString: pickerVisible: hidesSeparator: ) Convenience initializer for
DateTimePickerConfigurationDeclaration
Swift
init(title: Title, valueLabel: ValueLabel, controlState: ControlState, errorMessage: AttributedString?, range: ClosedRange<Date>?, selectedDate: Binding<Date?>, dateFormatter: DateFormatter?, pickerComponents: DatePicker.Components, dateStyle: Date.FormatStyle.DateStyle, timeStyle: Date.FormatStyle.TimeStyle, noDateSelectedString: String?, pickerVisible: Binding<Bool>, hidesSeparator: Bool)Parameters
titleThe title view for the date time picker.
valueLabelThe value view for the date time picker.
controlStateThe
ControlStateof the form view. The default isnormal.errorMessageThe error message of the form view.
rangeThe inclusive range of selectable dates.
selectedDateThe date value being displayed and selected.
dateFormatterThe
DateFormatterto be used to display the selectedDate. Default formatter will use customized dateStyle and timeStyle.pickerComponentsThe components shown in the date picker, default value shows date and time.
dateStyleThe custom style for displaying the date. The default value is
.abbreviated, showing for example, “Oct 21, 2015”.timeStyleThe custom style for displaying the time. The default value is
.shortened, showing for example, “4:29 PM” or “16:29”.noDateSelectedStringThe text to be displayed when no date is selected. If this property is
nil, the localized string “No date selected” will be used.pickerVisibleThis property indicates whether the picker is to be displayed.
hidesSeparatorThis property indicates whether the separator is to be displayed. Default is false.