title: How to set textfield placeholder's value to time picker's selected value
body: <p>On "func can()" pop up shows a textfield on which we click &amp; a time picker shows.I want to set textfield placeholder value to that selected picker's value</p>
  
  <pre><code>@IBAction func can(_ sender: UIButton) {
      let alertController : UIAlertController = UIAlertController(title: "", message: "Confirm Order ?", preferredStyle: UIAlertController.Style.alert)
      alertController.addTextField
      {
          (textField : UITextField!) -&gt; Void in
          textField.placeholder = "Expected Time"
          textField.addTarget(self, action: #selector(self.myTargetFunction), for: .touchDown)
          let okAction = UIAlertAction(title: "CANCEL", style: UIAlertAction.Style.destructive) {
          (UIAlertAction) in
          }
          let CANAction = UIAlertAction(title: "SUBMIT", style: UIAlertAction.Style.default) {
          (UIAlertAction) in
          // self.actionCancelOrderApiCall()
          }
          alertController.addAction(okAction)
          alertController.addAction(CANAction)
          self.present(alertController, animated: true, completion: nil)
      }
  }
  
  @objc func myTargetFunction(textField: UITextField) {
      var datePicker : UIDatePicker = UIDatePicker(frame: CGRect(x: 0,y: 500, width: self.view.frame.size.width, height: 250))
      datePicker.datePickerMode = .time
      datePicker.backgroundColor = UIColor.white
      if datePicker.isHidden == false{
          tblV.isHidden = true
          atchment1.isHidden = true
      }
      self.view.addSubview(datePicker)
  }
  </code></pre>