hackiftekhar / IQKeyboardManager

Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more.
MIT License
16.43k stars 2.4k forks source link

ToolBar For UIDatePicker not working #849

Closed TheSPST closed 7 years ago

TheSPST commented 7 years ago

i change my keyboard as UIDatePicker and now i want to handle the tool bar according to me like after pressing done button the selected date should be change. Thanks for IQKeyboardManager, and tell me the solution for my situation what should i do because i am newbie in ios. I tried to replace Default toolbar with My Custom toolbar but this option is available only for textField. not for DatePickerView.

hackiftekhar commented 7 years ago

I'm assuming that you change your textfield.inputView to UIDatePicker object. You can add your own UIToolbar over your date picker by setting a UIToolbar in textfield.inputAccessoryView. Library validate if there is any existing UIToolbar if Yes, then library does not replace your inputAccessoryView. In this way you can control your date picker and textfield by your own.