             switch @operator
                 when 'range', '-range'
                     if value[0]?
-                        @$('.range-from').data('datepicker').setDate(
+                        @ui.lowerBound.data('datepicker').setDate(
                             new Date(value[0]))
                     else
-                        @$('.range-from').val('')
+                        @ui.lowerBound.val(@minLowerBound ? '')
                     if value[1]?
-                        @$('.range-to').data('datepicker').setDate(
+                        @ui.upperBound.data('datepicker').setDate(
                             new Date(value[1]))
                     else
-                        @$('.range-to').val('')
+                        @ui.upperBound.val(@maxUpperBound ? '')
                 when 'gte'
-                    @$('.range-from').data('datepicker').setDate(
+                    @ui.lowerBound.data('datepicker').setDate(
                         new Date(value))
                 when 'lte'
-                    @$('.range-to').data('datepicker').setDate(
+                    @ui.upperBound.data('datepicker').setDate(
                         new Date(value))
 
     {DateControl}

            return operator

        getValue: ->
            from_text = @$('.range-from').val()
            from_date = @$('.range-from').data('datepicker').getFormattedDate()

            to_text = @$('.range-to').val()
            to_date = @$('.range-to').data('datepicker').getFormattedDate()

            value = []


            return @model.id

        getOperator: ->
            from = @ui.lowerBound.val()
            to = @ui.upperBound.val()
            operator = ''

            if from != "" and to != ""
