rails/rails — pull request #16252 by leckylao (2014-07-22 06:13:09+00:00)
Title: making date_helper selected value to accept Hash like the default option

The current selected option for date_helper only accept integer or Date/DateTime object. So there's a limitation when facing problem with just selecting the range value with "year - 2014", "month - Please select", "day - Please". As "2014-0-0" is not a valid date and by passing just integer, it will choose both month and day to be the same.

By making selected value to accept Hash like the default option can resolve this issue. E.g.
```ruby
<%= date_select "document", "created_at", {start_year: Date.today.year, end_year: Date.today.year - 5, prompt: { day: 'Please select day', month: 'Please select month', year: false}, selected: {day: params[:document]["created_at(3i)"].to_i, month: params[:document]["created_at(2i)"].to_i}}, class: 'form-control col-sm-3' %>
```