i am working on a project where i am getting 开发者_如何学运维date value from date-picker view. I want to check for the date so that it should not enter the date prior to today's date... plz help me with that... thank you..
In Objective-C
Set the date picker's minimumDate property:
datePicker.minimumDate = [NSDate date];
In Swift 4.x,
datePicker.minimumDate = Date()
(Where datePicker is a reference to your UIDatePicker )
精彩评论