agiapp / BRPickerView

BRPickerView 封装的是iOS中常用的选择器组件,主要包括:日期选择器(支持年月日、年月等15种日期样式选择,支持设置星期、至今等)、地址选择器(支持省市区、省市、省三种地区选择)、自定义字符串选择器(支持单列、多列、二级联动、三级联动选择)。支持自定义主题样式,适配深色模式,支持将选择器组件添加到指定容器视图。
https://github.com/agiapp/BRPickerView
MIT License
2.57k stars 446 forks source link

BRDatePickerView中BRDatePickerModeCountDownTimer手动选取时间失败 #230

Closed liunianhuaguoyanxi closed 5 months ago

liunianhuaguoyanxi commented 3 years ago

Demo复现: Demo中TestViewController.m 305行 改为datePickerView.pickerMode = BRDatePickerModeCountDownTimer 并注释Demo中TestViewController.m 311行 //datePickerView.isAutoSelect = YES;

代码复现: BRDatePickerView datePickerView = [[BRDatePickerView alloc]init]; datePickerView.pickerMode = BRDatePickerModeCountDownTimer; datePickerView.resultBlock = ^(NSDate selectDate, NSString *selectValue) { NSLog(@"selectValue=%@", selectValue); NSLog(@"selectDate=%@", selectDate); NSLog(@"---------------------------------");

}; [datePickerView show];

selectValue 永远为00:00

agiapp commented 3 years ago

pickerMode = BRDatePickerModeCountDownTimer时,不要设置minDatemaxDate