-
-
Save gliubc/04f527350e7e1ed1d69adad17fd9d38e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (IBAction)buttonStartTimeClicked:(id)sender { | |
WSDatePickerView *datePickerView = [[WSDatePickerView alloc] initWithDateStyle:DateStyleShowYearMonthDay scrollToDate:self.startDate CompleteBlock:^(NSDate *date) { | |
self.startDate = date; | |
self.textFieldStartTime.text = [self format:date]; | |
}]; | |
[datePickerView show]; | |
} | |
- (NSString *)format:(NSDate *)date { | |
NSDateFormatter *formatter = [NSDateFormatter new]; | |
formatter.dateFormat = @"yyyy-MM-dd"; | |
return [formatter stringFromDate:date]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment