 
         stripped_input = transformed_input.replace(/\D/g, '').slice(0,8)
 
-        date_pieces = []              # Reset array
+        date_pieces = []
         # Some simple validation as we type, basically just making sure
         # that the month and day are in range
         # Year/the entire date will be validated once we hit the final value

        return validDateFormat(date_obj, date)


      # Update the
      ngModel.$parsers.push (val)->
        return val if val is undefined || val==''

        mask = '__/__/____'
        date_pieces = []              # Empty array
        transformed_input = val

        # Find if there are slashes and iterate and update appropriately

        else
          return val

      ngModel.$formatters.push (val)->
        return val if val is undefined || val==''

