title: jqGrid filterToolbar - filter on DateTime using jquery ui datepicker
body: <p>I have been looking at filtering jqGrid by datetime using the filterToolbar. </p>
  
  <p>My question is based on Olegs excellent answer <a href="https://stackoverflow.com/questions/5500805/asp-net-mvc-2-0-implementation-of-searching-in-jqgrid/5501644#5501644">here</a>. </p>
  
  <p>I finally figured out how to trigger toolbar search on date as follows: </p>
  
  <pre><code>colModel: [{
      name: 'RequestDate',
      index: 'RequestDate',
      formatter: 'date',
      formatoptions: {
          newformat: 'm/d/Y h:iA'
      },
      searchoptions: {
          sopt: ['eq'],
          dataInit: function (elem) {
              $(elem).datepicker({
                  changeYear: true,
                  changeMonth: true,
                  onSelect: function (dateText, inst) {
                      setTimeout(function () {
                          $('#MyGrid')[0].triggerToolbar();
                      }, 50);
                  }
              });
          }
      }
  }]
  </code></pre>
  
  <p>Now when selecting the date from the picker I want to return all records for the given date ignoring the time. </p>
  
  <p>I have tried updating the <code>FilterObjectSet</code> method with no luck. Has anyone been able to implement this successfully?</p>
  
  <p><strong>What I've tried:</strong> (see the code in Olegs linked solution)</p>
  
  <p>Setting the FormatMapping to <code>"(dateadd(dd,0, datediff(dd,0, it.{0})) = @p{1})"</code> and
  addingSystem.DateTime to the switch statement: </p>
  
  <pre><code>case  "System.DateTime":
                          param = new ObjectParameter("p" + iParam, Convert.ToDateTime(rule.data));
                          break;
  </code></pre>
  
  <p>But this will result in a EntitySqlException: </p>
  
  <pre><code>'dateadd' cannot be resolved into a valid type or function.
  </code></pre>
  
  <p>Does anyone have a solution?</p>