anchor.diff:  
       init_datetimepicker: (base_id) ->
         if $.ui?.timepicker?
  -        query_input = @element.find('input#' + base_id + "v_0_value")
  -        selected_attr = @element.find('select#' + base_id + 'a_0_name option:selected')
  +        query_input = @element.find("input##{base_id}v_0_value")
  +        selected_attr = @element.find("select##{base_id}a_0_name option:selected")
   
           # Clear any datepicker from query input first
           query_input.datepicker('destroy')
  
positive.code:       target   = $(e.currentTarget)
        p = target.val() || ""
        base_id = target.attr('id').slice(0, -1)
        query_input = $('input#' + base_id + "v_0_value")
  
        # We need to use a dummy input to handle multiple terms
        multi_id = query_input.attr('id') + '_multi'
        multi_input = @element.find('#' + multi_id)
  
        if Select2?
          # Turn query input into Select2 tag list when query accepts multiple values
  
negative.code:       column_type = selected.data('type')
  
        base_id = target.attr('id').slice(0, -8)
        predicate_select  = @element.find("select##{base_id}p")
        predicate_select2 = @element.find("#s2id_#{base_id}p")
        query_input = $("input##{base_id}v_0_value")
  
        # Initialize datepicker if column is date/datetime/time
        $.proxy(@init_datetimepicker, this)(base_id)
  