DatePicker
public struct DatePicker : View
Wrapper of UIDatePicker. A control for the inputting of date and time values.
You can use a date picker to allow a user to enter either a point in time (calendar date, time value, or both) or a time interval (for example, for a timer). The date picker reports interactions to its associated target object. To add a date picker to your interface: Set the date picker mode at creation time. Supply additional configuration options such as minimum and maximum dates if required. Connect an action method to the date picker. Set up Auto Layout rules to govern the position of the date picker in your interface. You use a date picker only for handling the selection of times and dates. If you want to handle the selection of arbitrary items from a list, use a UIPickerView object.
DatePicker{ date in
print("\(date)")
}
.width(300)
.height(100)
-
Declaration
Swift
public var body: View { get }
-
The node behind the control
Declaration
Swift
public var node: ArgoKitNode? { get }
-
The type of the node
Declaration
Swift
public var type: ArgoKitNodeType { get }
-
init DatePicker
Declaration
Swift
public init(onDateChange: @escaping (_ onSelectedData: Date) -> Void)
Parameters
onDateChange
dateChange callback
-
The current style of the date picker.
Declaration
Swift
@available(iOS 13.4, *) public func datePickerStyle() -> UIDatePickerStyle
Return Value
current style
-
Undocumented
Declaration
Swift
public func padding(top: ArgoValue, right: ArgoValue, bottom: ArgoValue, left: ArgoValue) -> DatePicker
-
Undocumented
Declaration
Swift
public func padding(edge: ArgoEdge, value: ArgoValue) -> DatePicker