Skip to content

Commit 15ecaa1

Browse files
committed
Show DatePicker in the controls playground
1 parent 3df0782 commit 15ecaa1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Demo/App.swiftpm/Sources/MoreControlsPlaygrounds.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,22 @@ import AndroidSwiftUI
44
import SwiftUI
55
#endif
66

7+
import Foundation
8+
79
struct MoreControlsPlayground: View {
810
@State private var quantity = 1
911
@State private var password = ""
1012
@State private var choice = "None"
13+
@State private var birthday = Date(timeIntervalSince1970: 946_684_800) // 2000-01-01T00:00:00Z
1114
var body: some View {
1215
ScrollView {
1316
VStack(alignment: .leading, spacing: 0) {
1417
Example("Stepper") {
1518
Stepper("Quantity: \(quantity)", value: $quantity, in: 0...10)
1619
}
20+
Example("DatePicker") {
21+
DatePicker("Birthday", selection: $birthday)
22+
}
1723
Example("SecureField") {
1824
VStack(alignment: .leading, spacing: 8) {
1925
SecureField("Password", text: $password)

0 commit comments

Comments
 (0)