vara vara - 3 months ago 45
Swift Question

SBDatePicker Its posssible to set minimum date and maximum date in swift?

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???

Answer

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())