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 whole Hstack.i face this issue i am a fresher so anyone find a solution let me know.kindly request all
New contributor
Arjunan M is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.