Closed pradeepippaguntaspv closed 7 years ago
Hey @pradeepippaguntaspv, thanks for using DatePickerDialog! 🎉 You can check a working example in our example project:
var dateComponents = DateComponents()
dateComponents.day = 10
let threeDaysForward = Calendar.current.date(byAdding: dateComponents, to: currentDate)
DatePickerDialog().show(title: "DatePickerDialog", doneButtonTitle: "Done", cancelButtonTitle: "Cancel", maximumDate: threeDaysForward, datePickerMode: .date) { (date) in
if let dt = date {
self.textField.text = "\(dt)"
}
}
How to restrict the future date ?