Explorar o código

时间选择记录上次选择时间

Steven hai 6 meses
pai
achega
bd298b7f71

+ 5 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/View/HomeworkBodyView.m

@@ -330,6 +330,11 @@
 }
 
 - (void)timeChooseAction {
+    [self.dateFormatter setDateFormat:@"yyyy-MM"];
+    NSDate *preDate = [NSDate date];
+    if (![NSString isEmptyString:self.chooseDate]) {
+        preDate = [self.dateFormatter dateFromString:self.chooseDate];
+    }
     self.sortView.arrowUp = YES;
     KSFullDatePicker *picker = [[KSFullDatePicker alloc] initWithTitle:@"" date:[NSDate date] pickMode:KSDATEPICKER_MODE_YEAR_MONTH sureButtonColor:THEMECOLOR selectDateBlock:^(NSString *date) {