title: asp.net mvc 4 Filter table using Datepicker
body: <p>I'm trying to filter a table when a date in the datepicker was click. What I did was send the date clicked as JSON to my controller using $.get and then use linq to filter the table then return the view with the filtered table as my model. I used firebug to check the response and it shows me the correct html with the tables matching the date clicked but it isn't showing in the browser. How do I fix this?</p>
  
  <pre><code>$("#adminCalendar").datepicker({
      onSelect: function (date) {
          $.get("/Administrator/DateFilter", { "date": date }, null);
      }
  });
  </code></pre>
  
  <p>The controller:</p>
  
  <pre><code>    public ActionResult DateFilter(string date)
      {
          var dateTime = Convert.ToDateTime(date).ToShortDateString();
  
          var transactions = (from transaction in db.Transactions
                             select transaction).ToList();
  
  
          var tran = from transaction in transactions
                     where transaction.OccassionDate.ToShortDateString() == dateTime
                     select transaction;
  
  
          return View("Index", tran);
      }
  </code></pre>