DatePickerView *datePickerView = [DatePickerView datePickerViewWhetherAttachToolBar:NO];
datePickerView.ownerView = self.textField;
NSDateFormatter *dateFormatter = [NSDateFormatter new];
dateFormatter.dateFormat = @"yyyy-MM-dd HH:mm:ss"; // number of section depends on dateFormat
datePickerView.dateFormatter = dateFormatter;
self.textField.inputView = datePickerView;
dateFormatter.dateFormat = @"yyyy-MM-dd HH"; // number of section depends on dateFormat