similar to: How to give onchange for select_year rails helper....

Displaying 20 results from an estimated 1000 matches similar to: "How to give onchange for select_year rails helper...."

2008 Feb 26
2
Specify HTML options on select_year
Rails 1.2.3 It appears that the select_year helper doesn''t accept HTML attributes as part of the options array. Does anyone have a way to successfully pass an :onchange attribute in to the select_year helper? I''m going to do it with Javascript directly for now. Thanks, Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You
2006 Nov 04
2
date_select parameter
Trying to add start year to date_select <%= date_select(:start_year => 1980)%> It''s throwing an exception "wrong number of arguments (1 for 0) Can''t I add a start_year, API shows this option ? TIA Stuart http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
2006 Jun 17
2
problem with select_date
In my form I have these items: <%= select_year Date.today, :start_year => Schoolyear.get_startdate.year, :end_year => Schoolyear.get_enddate.year %> <%= select_month Date.today.month %> No matter what I do, in my controller I can''t seem to access the selected year and month. I have tried params[:month].to_s and also
2008 Jun 26
2
Problem with date_select after Rails 2.1 upgrade
Folks, I think I should start a new thread for this, because a similar one I saw is a bit old and the resolution there doesn''t seem to apply to what I''m running into now. Anyway, my date_select calls are bombing on me with the exception: ---- ActionView::TemplateError (wrong number of arguments (3 for 2)) on line #8 of entries/_dates_form.haml: 8: = date_select(
2006 May 24
2
Only years from 2001 to 2011 are available in a date field
When I try to edit a date field in the drop down list I have only years from 2001 to 2011: how can I add an arbitrary year that is NOT included in this list? -- Posted via http://www.ruby-forum.com/.
2007 Apr 12
3
Radrails and date in mysql problem
Hi, Im using radrails and mysql database, im using DATE in mysql for a date of birth column, When i use this in Radrails the date shows as dropdown lists, the days and month are fine but the year list only shows 2002-2012. Is there any way of extending the years? as its not suitable for date of birth. Any help appreciated -- Posted via http://www.ruby-forum.com/.
2006 Mar 07
6
how to add onchange javascript event to select field
I would like to add javascript ''onChange'' event handling for a select field, such as <%= collection_select("job", "client_id" , @clients, "id", "name") %> with onChange="xxx" Anyone know how to make this work? Thank you, Scott -- Posted via http://www.ruby-forum.com/.
2006 Jan 19
2
date_select broken
I am using date_select and in some instances it only shows about 10 years worth of choices. Same form on other users shows the whole range. date_select looks like this <%= date_select ''user'',''birthdate'' , :start_year => 1940 %> I would expect to always see 1940-2006 or so , but i dont always do. Is there a way to force the range or explain why i
2006 Mar 04
5
has_many and belongs_to example?
Hi! If i have 2 tables i.e. product and images and product has_many images, image belongs_to product - how to create _form.rhtml, new/create and edit/update methods in product controller, so in a single form i can add one product and MANY (let''s assume for now that this number is fixed) images for this product? Pleeeeease help me :) -- Posted via http://www.ruby-forum.com/.
2008 Jan 12
2
Problems with date field
Hi, I''m creating a date type field to put birthdate, but the years on this field only go to 2003, what should I do?? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To
2007 Apr 14
1
how to add class to date_select helper
Hi, I have this helper and would like to add a html class to each of the select box''s it generates, however I have been unable to find a way? <%= f.date_select ''date_of_birth'', :order => [:day,:month,:year], :start_year => 1940, :end_year => Time.now.year, :include_blank => true %> Any suggestions? thanks john -- Posted via
2009 Sep 02
8
select_month helper
I''m trying to rewrite a fusebox-like application (Active4D plugin to 4D database) in RoR/postgres and I''m doing okay - but keep running into things that stump me. It seems like it takes me hours to figure out something that I could have written in pure code in minutes. The select_month and select_day helper has been my latest waste of time. All I''m trying to do is add
2006 Sep 15
1
In datetime_select, :order does not work, but it works for date_select Why
Hi All In my project I am to take date of birth from user so I used datetime_select. It renders three selection boxes, year, month and day. But I want order as day, month and year. I added :order option for datetime_select, it renders normal selection boxes with order year, month and day. Why :order does not work with datetime_select? see my following code <%= datetime_select(:user2,
2007 Dec 02
4
select and passing some javascript
Hello, After reading and reading the documentation, I can''t append some javascript function into a select. It''s not possible ? documentation: ------------------------------------------------------------- select(object, method, choices, options = {}, html_options = {}) some code: ------------------------------------------------------------- return select(:id, :year, [
2004 Jul 31
3
Bug in new_work_item
Hi all, Windows 2000 Ruby 1.8.2 R7 VC++ 6.0 I noticed that if I try to call new_work_item and give the task a name that already exists, I get a segfault: C:\eclipse\workspace\win32-taskscheduler>ruby test.rb "0.1.0" test.rb:22:in `new_work_item'': NewWorkItem() function failed (Win32::TaskSchedul erError) from test.rb:22 test.rb:22: [BUG] Segmentation fault ruby
2006 Apr 20
4
Small Date Formatting Question regarding datetime_select()
Is there a way to make datetime_select() dropdowns work on a 12hr clock? I need to make a input field that works exactly like the reminders datetime selecton dropdowns in Backpack to populate a datetime field in my DB. i.e in the format: month, day, year ? hour (1-12) minute am/pm. Should I change my database to have a separate column for date and one for time and use date_select()? Can
2010 Oct 06
4
List of html_options available
I''ve noticed lots of people online complain about not good documentation for Rails. I''m a PHP programmer but I''m a newbie on Rails. I''m creating a form with a drop-down menu. I finally got to do it. I noticed there is a html_options parameter for select. I was curious as to what other html_options are available but couldn''t find a list of options. I
2006 Mar 15
1
Strange behaviour of dates
Imagine a crud app that tracks people applying for a loan, here is the layout I have: Mysql database: create table apps ( id int auto_increment primary key, primary_id int not null, secondary_id int null, constraint fk_primary_id foreign key(primary_id) references (contacts.id), constraint fk_secondary_id foreign key(secondary_id) references (contacts.id)) create table contacts ( Id int
2009 Jan 28
3
Apply style in collection_select ?????
Hi to all, i have this snip i want to apply style to this combo but there is no effect help....... <%= collection_select(:customer,:country_id, @countries,:id, :country, html_options={ "style" => "width:110px" },:onchange => ''updateState('''');'',:id =>''country_id'' )%> Thanks, -- Posted via
2006 Mar 29
4
using onchange options in forms
Hello, I''m trying to get a select field to update a view via the ''onchange'' option. I''ve seen examples of it here in the forum where people hardcode the forms and use javascript to trigger the change (and nearly all have complained that it''s a hack) and I''m wondering if anyone has a more elegant solution using the embedded ruby methods?