 
     _init()
 
-    # If input is cleared manually, set dates to null.
-    el.change ->
-      if $.trim(el.val()) == ''
-        $timeout ()->
-          modelCtrl.$setViewValue(
-            startDate: null
-            endDate: null
-          )
-
-    _initDateField = (field, attribute, validator, modelName, optName) ->
-      if attrs[attribute]
+    _initBoundaryField = (field, validator, modelField, optName) ->
+      if attrs[field]
+        modelCtrl.$validators[field] = (value) ->
+          validator(opts[optName], value[modelField])
         $scope.$watch field, (date) ->
-          if date
-            if not modelCtrl.$isEmpty(modelCtrl.$modelValue)
-              validator(date, modelCtrl.$modelValue[modelName])
-            opts[optName] = moment(date)
-          else
-            opts[optName] = false
+          opts[optName] = if date then moment(date) else false
           _init()
 
-    _initDateField('dateMin', 'min', _validateMin, 'startDate', 'minDate')
-    _initDateField('dateMax', 'max', _validateMax, 'endDate', 'maxDate')
+    _initBoundaryField('min', _validateMin, 'startDate', 'minDate')
+    _initBoundaryField('max', _validateMax, 'endDate', 'maxDate')
 
     if attrs.options
       $scope.$watch 'opts', (newOpts) ->
-        opts = angular.merge(opts, newOpts)
+        opts = angular.merge(opts, newOpts, {autoUpdateInput: false})
         _init()
       , true
 

picker = angular.module('daterangepicker', [])

picker.constant('dateRangePickerConfig',
  locale:
    separator: ' - '
    format: 'YYYY-MM-DD'

        else date.format(opts.locale.format)

      if opts.singleDatePicker
      then f(viewVal.startDate)
      else [f(viewVal.startDate), f(viewVal.endDate)].join(opts.locale.separator)

    _parse = (value) ->
      f = (val) ->
