Check out example codes for "swiftui date input". It will help you in understanding the concepts better.

Code Example 1

var body: some View {
    DatePicker("Please enter a date", selection: $wakeUp)
}

Learn ReactJs, React Native from akashmittal.com