| | |
| | | } |
| | | |
| | | let idCardView = IDCardView() |
| | | idCardView.box.bind { text in |
| | | self.tf_idCard.text = text |
| | | idCardView.box.bind { [weak self] text in |
| | | self?.tf_idCard.text = text |
| | | } |
| | | tf_idCard.inputView = idCardView |
| | | |
| | |
| | | extension AddStudentVC:UITextFieldDelegate{ |
| | | func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool { |
| | | if textField == tf_birthday{ |
| | | CommonDatePickerView.show(before: 18, after: 0, type: .YMD) { year, month, day in |
| | | textField.text = String(format: "%ld-%02ld-%02ld", year,month,day!) |
| | | CommonDatePickerView.show(before: 18, after: 0, type: .YMD) { year, month, day,_,_ in |
| | | textField.text = String(format: "%ld-%02ld-%02ld", year!,month!,day!) |
| | | } |
| | | return false |
| | | } |