title: Cant get the values from filters to post on my jqgrid
body: <p>I have a jqGrid and some filter fields, 2 comboboxes and 2 jQuery-ui datepickers. When I try to post the values from the fields I only get the original value. For example, my combobox starts with an "all" option, which value is -1, no matter which option I select -1 will be posted. The same goes for the 2 datepickers, I only get "";</p>
  
  <p>This is my code:</p>
  
  <pre><code>&lt;?php 
      require_once 'DAO/programaDAO.php';
  ?&gt;
  
  &lt;script&gt;
  
  $(document).ready(function(){     
  
      $( "#buscarBtn" ).button().click(function(){
              $("#gdCiclos").trigger('reloadGrid');
      });
  
      $( "#from" ).datepicker({
        defaultDate: "+1w",
        changeMonth: true,
        numberOfMonths: 3,    
        onClose: function( selectedDate ) {
          $( "#to" ).datepicker( "option", "minDate", selectedDate );
        }
      });
      $( "#to" ).datepicker({
        defaultDate: "+1w",
        changeMonth: true,
        numberOfMonths: 3,
        onClose: function( selectedDate ) {
          $( "#from" ).datepicker( "option", "maxDate", selectedDate );
        }
      });
  
      $(function () {
      $("#gdCiclos").jqGrid({
          url:'sampleData.php',
          postData: {fechafin:document.getElementById('to').value, fhechainicial:document.getElementById('from').value, programaSelect:document.getElementById('selectPrograma').value, estadoSelect:document.getElementById('selectEstado').value},
          datatype: 'json',
          mtype: 'POST',
          colNames:['Ciclo Nº','Fecha Inicio', 'Fecha Fin', 'Programa', 'Estado'],
          colModel:[
          {name:'Ciclo Nº', index:'id', width:80, resizable:false, align:"center"},
          {name:'Fecha Inicio', index:'FechaInicio', width:200,resizable:false, sortable:true},
          {name:'Fecha Fin', index:'FechaFin', width:200,resizable:false, sortable:true},
          {name:'Programa', index:'Programa', width:165,resizable:false, sortable:true},
          {name:'Estado', index:'Estado', width:165, sortable:true}
          ],       
          pager: "#pagerGdCiclos",
          rowNum: 30,
          rowList: [10, 30, 100],
          sortname: "FechaInicio",
          sortorder: "desc",
          viewrecords: true,
          gridview: true,
          autoencode: true,
          caption: "Ciclos",
          height:'auto'
  
      });
  });
  
   });
  
  
  
  &lt;/script&gt;
  
  &lt;div id="filtrosBusqueda"&gt;
                  &lt;div id="divBusProg"&gt;
                  &lt;label id="labelPrograma" class="labelBusquedaItem"&gt;Programa: &lt;/label&gt;
                  &lt;?php
  
                      $eqId = $_GET['eqId'];
                      $listaProgramas = getTiposProgramasByEquipo($eqId);
                      echo("&lt;select id=\"selectPrograma\" class=\"selectBox\"&gt;");
                          echo '&lt;option value="-1"&gt;Todos&lt;/option&gt;';
                      foreach ($listaProgramas as $value) {
                          echo '&lt;option value="'.$value['programa_id'].'"&gt;'.$value['descripcion'].'&lt;/option&gt;';
                      }
                      echo("&lt;select id=\"selectPrograma\"&gt;");
                  ?&gt;
               &lt;/div&gt;
  
      &lt;div id="divBusEst"&gt;
  
                  &lt;label id="labelPrograma" class="labelBusquedaItem"&gt;Estado: &lt;/label&gt;
              &lt;?php
  
                  $listaEstados = getEstados();
                  echo("&lt;select id=\"selectEstado\" class=\"selectBox\"&gt;");
                      echo '&lt;option value="-1"&gt;Todos&lt;/option&gt;';
                  foreach ($listaEstados as $value) {
                      echo '&lt;option value="'.$value['ciclo_estado_id'].'"&gt;'.$value['descripcion'].'&lt;/option&gt;';
                  }
                  echo("&lt;/select&gt;");
              ?&gt;
      &lt;/div&gt;
  
      &lt;div id="divBusRangoFecha"&gt;
          &lt;label for="from" class="labelBusquedaItem"&gt;Desde: &lt;/label&gt;
          &lt;input type="text" id="from" name="from" class="selectBox" /&gt;
          &lt;label for="to" class="labelBusquedaItem"&gt;Hasta: &lt;/label&gt;
          &lt;input type="text" id="to" name="to" class="selectBox" /&gt;
      &lt;/div&gt;
      &lt;a href="#" id="buscarBtn"&gt;Buscar&lt;/a&gt;
  
      &lt;/div&gt;
  &lt;div    id="gridBusqueda"&gt;
      &lt;table id="gdCiclos"&gt;&lt;/table&gt;
      &lt;div id="pagerGdCiclos"&gt; &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>