search for: discard_month

Displaying 9 results from an estimated 9 matches for "discard_month".

2005 May 08
3
Overriding date_select in local project to use custom value rather than blank for starting option...
I would like to have a date control on a page and I would like a behavior similar to what you get using date_select with the :include_blank => true option where the first value in the dropdown is "- Month -", "- Day -", or "- Year -" rather than a blank value for the respective month, day, and year select fields. I took a look at the ruby source for
2006 Mar 21
5
Getting a time select input
...th select_time. The datetime_select would work if I could get rid of the date part, there is no time_select helper! And I have tried adding the :discard option but it does not get rid of the year... <%= datetime_select("search", "start_time", { :discard_year => true, :discard_month => true, :discard_day => true }) %> Can anyone clue me in :) Kris. -- Posted via http://www.ruby-forum.com/.
2006 Feb 05
0
How can i specify default time to datetime_select tag
...thod_name}(#{position}i)]") } datetime = options[:include_blank] ? (value || nil) : (value || Time.now) datetime_select = select_year(datetime, options_with_prefix.call(1)) datetime_select << select_month(datetime, options_with_prefix.call(2)) unless options[:discard_month] datetime_select << select_day(datetime, options_with_prefix.call(3)) unless options[:discard_day] || options[:discard_month] datetime_select << '' &mdash; '' + select_hour(datetime, options_with_prefix.call(4)) unless options[:discard_hour]...
2005 May 02
1
datetime_select and discard
ok so datetime_select if you use the discard options say { :discard_month => true } when you just do update_attributes on said object year would be correct month would be the hour date would be the minute so if you select year: 2005 hour: 12 minute: 13 the time object would go into the db as: ''2005-12-13 00:00:00'' so my question is how do i ge...
2006 Mar 21
5
Use select_date for my model?
Hi all I have a model "party" that has a time field "starts_at". I have created a form to add new instances of this model. <%= select_date Date.today, :prefix => ''party'' %> Sadly I get the error: NoMethodError in Parties#add undefined method `month='' for #<Party:0x256a600> How can I fix this problem? I remember that I saw in
2006 Feb 18
0
indexed date_select
...y", [ "Fiction", "Non-Fiction", "Poetry", "First-Boak", "Translation" ], { :include_blank => false }) %></td> <td><%= date_select("award[]", "year", :start_year => 2007, :end_year => 1980, :discard_month => true, :include_blank => false) %></td> </tr> <% end %> This outputs: <tr> <td><select id="award_9_category" name="award[9][category]"><option value="Fiction">Fiction</option> <option value="Non-F...
2006 Jan 25
0
datetime_select discard year bug?
I''m trying to have a select box for starting time. I''m using: datetime_select(:user, :start, :discard_year=>1) but I get an error. "discard_month=>1" seems to work but leaves the year on the form. Using Rails 1.0 and Postgresql. Anyone having success with this?
2006 Jun 16
3
finding out about options
I''ve been to the RoR api docs trying to find out about options for various methods (mostly for select helper methods), yet I find no listing of options even when the method described says that it takes options. How can I find out what are valid options say for a date_select tag? Thanks, Dave
2007 Jan 23
7
Ajax
...9;'e[]'',''institucion'') %></td> <td><strong>A&ntilde;o:</strong> <% if false %> <%= date_select(''e[]'', ''ano'', :start_year => 1960,:discard_day => true, :discard_month => true)%><% end %> </td> <td> <%= link_to_remote ''Eliminar Estudio'', :url=>{:action => ''eliminar_estudio'', :id => @persona, :estudio_id => @e}, :update=>''est...