-
-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActionSheetDatePicker target-action #27
Comments
Hi, I don't understand your question. |
Thanks for your quick response! Sorry if I wasn't clear. I am basically trying to detect when a user presses cancel/hides the picker. It's working with string pickers, but not for date pickers. It basically never calls the selector. I'm adding the code below straight into the example: [datePicker setCancelButton:[[UIBarButtonItem alloc] initWithTitle:@"Not sure" style:UIBarButtonItemStylePlain target:self action:@selector(datePickerCancelled:) ]]; Here's the entire method: -(IBAction)selectATime:(id)sender {
} |
Ok! It really missed feature. Even 2!
I will fix it soon! |
Ok, I decide to not implement feature 2, because it's not generic and can cause bug in more complicated situations. ActionSheetDatePicker *datePicker = [[ActionSheetDatePicker alloc] initWithTitle:@"Select a time"
datePickerMode:UIDatePickerModeTime
selectedDate:self.selectedTime
target:self
action:@selector(timeWasSelected:element:)
origin:sender
cancelAction:@selector(datePickerCancelled:)]; |
Feel free to reopen issue, if you still have questions. |
I'm having a hard time getting a custom cancel button and target-action to work with a datePicker. I just added setCancelButton to the example project below:
The text was updated successfully, but these errors were encountered: