The Rails plugin - Searchlogic, from binary logic - offers the ability to filter by date. I have my form set up like so...
<% form_for @search do |f| %>
<%= f.label :start %> <%= f.select :due_at_after, [[['','']],['November', '2009-11-01'.to_date],['December', '2009-12-01'.to_date]] %><br>
<%= f.label :end %> <%= f.select :due_at_before, [[['','']],['December', '2009-12-01'.to_date],['January', '2010-01-01'.to_date]] %>
<%= f.submit 'Search' %>
<% end %>
But, the date I'm getting back from the @search object as generated in the controller...
@search = Task.with_member(current_user).search(params[:search])
is generating a date param that looks like this
{:due_at_after=>Sat, 31 Oct 2009 20:00:00 EDT -04:00}
With the two formats, the form will not show the drop-down as selected. It looks as if the format in the searchlogic object uses a timezone adjusted time, too.
Any thoughts on how to handle this?