Commit 7ec78709 authored by pete谢兆麟's avatar pete谢兆麟

时间选择器优化

parent b965c96a
......@@ -336,19 +336,13 @@ extension YHDatePickView: UIPickerViewDelegate,UIPickerViewDataSource {
}
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
if component == 1, self.type == .yyyymmdd {
if (component == 0 || component == 1), self.type == .yyyymmdd {
pickerView.reloadComponent(1)
pickerView.reloadComponent(2)
}
if component == 0, lastIsTaday, self.type != .yyyy {
if self.type == .yyyymm {
pickerView.reloadComponent(1)
if self.type == .yyyymmdd {
pickerView.reloadComponent(2)
}
}
if component == 1, lastIsTaday, self.type == .yyyymmdd {
pickerView.reloadComponent(2)
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment