Reputation: 836
I am new for developing the ios application, I have used SBPickerSelector in Cocapods framework for Selecting datePicker. whether If possible to set the MinumDate and MaximumDate???
Upvotes: 0
Views: 677
Reputation: 1263
I do not understand what do you get from using SBDatePicker
, it look like they simply wrap the original class UIDatePicker
.
The problem of using this kind of wrappers is that they don't always have the full feature set of the original class and you count on their developers to keep up with Apple changes (which they don't).
If you simply use UIDatePicker
you can set maximumDate
and minimumDate
, just like you asked.
Check out the UIDatePicker Class Reference
And here is an example of setting the minimum and maximum dates
Upvotes: 0
Reputation: 2294
Try;
let picker: SBPickerSelector = SBPickerSelector.picker()
//Minimum Date
picker.datePickerView.minimumDate = NSDate(); // A date
//Maximum Date
picker.datePickerView.maximumDate = NSDate(); // An other date ;
//or picker.setMaximumDateAllowed(NSDate())
Upvotes: 2