search for: discard_year

Displaying 13 results from an estimated 13 matches for "discard_year".

2006 Jan 26
3
discard_year => true
Hi All I''m attempting to make a simple time select field so I thought I just needed a datetime_select with the option :discard_year => true. However, every ''discard'' option except discard_year seems to work. So I''m left with a year, hour and minute to select. Could anyone please point me in the right direction? Much appreciated. Doug -- Posted via http://www.ruby-forum.com/.
2005 May 03
0
:discard_year => true for date_select
Hey guys, There''s been a patch in the queue for a few days around the discard_year option for date_select and datetime_select. The author has also attached a second patch which makes similar changes, but instead of just dropping the field, a hidden field is used instead. We only need one of these tickets open, and we probably should apply one of the patches. http://dev.rubyon...
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
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 Mar 21
5
Getting a time select input
...4i, this does not happen with 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 May 18
4
time select with am/pm?
Hi everyone, Is there a time select helper which uses a 12 hour clock rather than a 24 hour one? Also, does anyone know if :discard_year actually works in datetime_select now, or how I could find this out? Thanks! Daniel
2011 Jan 04
1
Problem with "date_select" form helper
Hi, I am using "date_select" form helper to select the date. My code is as follows:- <%=date_select("post", "written_on", :prompt => { :day => ''Select day'', :month => ''Select month''}, :discard_year=>true)%> It works. But there is problem with the number of days for each month. The days combobox has populated with the days from 1 to 31, but it is not right in case of the month "Feb" as well as the months which has the number of days are 30. Is there a way to solve this proble...
2005 Dec 23
6
Selecting time
...nly holds hours and minutes I tried to use the select_time helper. Unfortunately there seems to be a small bug in this helper cause the fieldname that''s being parsed is always date["name you give to it using the :field_name option"]. I just tried the datetime_select using the :discard_year and -month options, but this helper always needs the year selection field (probably has something to do with the fact that Time.gm() requires at least the year argument). Although this works (the value inside the ''time'' column is nicely being mapped to the ''time'&...
2006 Jan 22
0
datetime_select with postgresql time field
I get errors when committing to a postgresql time field using datetime_select discarding year,month, day. Also, year shows on my form despite calling "discard_year=>1. Do I need a special mapping for time fields ? Any ideas?
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?
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 get the time object properly
2006 Aug 31
0
date_select error
Hi, when I try to use a date_select like this: <%= date_select(:contact, :event, :discard_year => true) %> I get the following error: 1 error(s) on assignment of multiparameter attributes Ticket #3811 (http://dev.rubyonrails.org/attachment/ticket/3811/date_helper_megapatch_against_1.1.2.0) Says it''s already corrected but I''m using rails 1.1.6 an still get the erro...
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