Relative Content

Tag Archive for swiftuidatepickeroverlay

how to set datepicker action in whole Hstack

HStack(spacing: 10) { let date = utcToLocal(iso8601Formatter.string(from: birthday), from: “yyyy-MM-dd’T’HH:mm:ssZ”, to: “dd-MM-yyy”) Text(date) Spacer() Image(systemName: “calendar”) .font(.title3) } .padding() .background(Color.white) .overlay( DatePicker( “select Date”, selection: $birthday, displayedComponents: [.date] ) .labelsHidden() .blendMode(.destinationOver) .onChange(of: birthday) { value in isChild = checkAge(date:birthday) } .overlay( RoundedRectangle(cornerRadius: 5) .stroke(lineWidth: 1) ) ) i want a solution to datepicker action in […]