title: How do we add UIDatePicker in TableView cell?
body: <p>PartiesTableViewController:</p>
  
  <pre><code>func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell
  {
          let cell: UITableViewCell = UITableViewCell(style: UITableViewCellStyle.subtitle, reuseIdentifier: "test")
  
          cell.textLabel?.text = party.lists[indexPath.row].name
  
          //----------how do we add UIDatePicker in the cell??----------
  
          cell.detailTextLabel?.text = party.lists[indexPath.row].address
  
          return cell
  }
  </code></pre>
  
  <p>AddPartyViewController:</p>
  
  <pre><code>@IBAction func save(_ sender: UIButton)
  {
      print("save clicked \(nameTextField.text)")
  
      party.lists.append(list(name: nameTextField.text!, address: addressTextField.text!, startDate: datePicker.date))
  
      self.view.endEditing(true)
  
      self.dismiss(animated: true, completion: nil) //when button clicked, go back to front page, which is PartiesTableViewe
  }
  </code></pre>
  
  <p>Party:</p>
  
  <pre><code>import UIKit
  
  var party: Party = Party()
  
  struct list
  {
      //var id:String
      var name:String
      var address:String
      var startDate:Date
  }
  class Party: NSObject
  {
      var lists = [list]()
  
      func addParty(name: String, address: String, startDate: Date)
      {
          //lists.append(list(date:date, name: name, address: address))
          lists.append(list(name: name, address: address, startDate:startDate))
      }
  }
  </code></pre>
  
  <p>Thank you for reading! I am very new to Swift 3 and I was working on todo list with UIDakePicker. I was struggling with adding UIDatePicker into tableview cell and I was able to add party name and party address by using "cell.textLabel?.text = party.lists[indexPath.row].name" and "cell.detailTextLabel?.text = party.lists[indexPath.row].address". </p>
  
  <p>name appears in cell and address appears right below name in the same cell. I was trying to display date that is selected by UIDatePicker in AddPartyViewController right next to name in tableview cell so all 3 of them are in the same cell.</p>
  
  <p>Thank you for helping!</p>