     }
     
     @IBAction func endDateEditing(_ sender: UITextField) {
-        startDateEditing = false
+        editingStartDate = false
         
         let (_, maxDate) = minMaxDate
         

    }
    
    func datePickerValueChange(_ sender: UIDatePicker) {
        let dateString = Utils.stringFrom(date: sender.date, startDate: startDateEditing, longFormat: longDateFormat)
        if startDateEditing {
            startDate = sender.date
            startDateTextField.text = dateString
        } else {

    
    var editItem: Item?
    
    var editingStartDate = false
    
    var startDate: Date!
    var endDate: Date!
