     _initBoundaryField = (field, validator, modelField, optName) ->
       if attrs[field]
         modelCtrl.$validators[field] = (value) ->
-          validator(opts[optName], value[modelField])
+          value and validator(opts[optName], value[modelField])
         $scope.$watch field, (date) ->
           opts[optName] = if date then moment(date) else false
           _init()


    modelCtrl.$isEmpty = (val) ->
      # modelCtrl is empty if val is empty string
      not val and val.length > 0

    # _init has to be called anytime we make changes to the date picker options
    _init = ->

      if modelCtrl.$modelValue and modelCtrl.$modelValue.startDate
        _setStartDate(modelCtrl.$modelValue.startDate)
        _setEndDate(modelCtrl.$modelValue.endDate)
      else _clear()
      # Update the input with the $viewValue (generated from $formatters)
      el.val(modelCtrl.$viewValue)

    # This should parse the string input into an updated model object
