search for: select_year

Displaying 20 results from an estimated 21 matches for "select_year".

Did you mean: select_read
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/. --~-...
2009 Jan 28
1
How to give onchange for select_year rails helper....
<%=select_year(Date.today,:include_blank=>true, :start_year => Date.today.strftime("%Y").to_i, :end_year => 1999)%> i am using rhis helper... now i want to give onchange here.... Please help me to solve this .... thanks in advance JK -- Posted via http://www.ruby-forum.com/. --~--~-...
2005 Dec 12
1
Search screens with dates
...:order that leaves me with something like <label>Date/Time To:</label><br /> <%= select_day time = Date.today, {:prefix => ''to''} %> <%= select_month Date.today, {:prefix => ''to''} %> <%= select_year Date.today, {:prefix => ''to''} %> <%= select_hour Time.now, {:prefix => ''to''} %> <%= select_minute Time.now, {:prefix => ''to''} %> which I can just about live with. But how do I easily take those five f...
2008 Jun 26
2
Problem with date_select after Rails 2.1 upgrade
...es/_dates_form.haml: 8: = date_select( ''context'', ''start_date'', {:start_year => 2007, :order => [:month, :day, :year], :use_short_month => true, :include_blank => false}) vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb: 655:in `select_year'' vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb: 655:in `send'' vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb: 655:in `date_or_time_select'' .... ---- If I dig into DateHelper with the debugger, this appears to be the line that&...
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 trie...
2008 Jul 04
4
Routing and Parameters
...;'m trying to create a form that will allow my users to navigate from one month/year to the next. Here''s my form: <% form_tag(tasks_path, :method => :get) do %> <%= select_month(Date.today, :prefix => ''month'', :discard_type => true %> <%= select_year(Date.today, :prefix => ''year'', :discard_type => true %> <button>go</button> <% end %> If you submit this form, the request generates an URL like this: / tasks?month=7&year=2008 sent to the #index method on TasksController. Why isn''t this...
2006 Jul 26
2
text_field and date_select in collection
hello, i would like to display a collection of records on one page (e.g. an author record with all his/her books). a record contains a text_area (e.g. a description of the book) and a date_select (e.g. when the book was published). <% for @book in @author.books %> <%= text_area ''book[]'', ''note'' %> <%= datetime_select
2006 May 05
1
select :selected doesn''t actually generate a selected option
...uot;6?","6"], ["7?","7"], ["8?","8"], ["9?","9"], ["10?","10"], ["11?","11"], ["12?","12"]], :selected => @month, :include_blank => false ) %> <%= select_year(Date.new(@year, @month, 1)) %> <%= submit_tag ''??'' %> where @month is the number of the current calendar month. I''ve tried it with to_s if that was the problem, I''ve tried just :selected => 5, or :selected => "5", but nothing affects it...
2006 Jun 13
1
How to give conditions in rails
...;'holiday_edit'' %> </center></b> </td> </tr> </table> <br> <br> <p> <h1 align="center"><i>List of Holidays</i></h1> </p> <br> <% if @holidays.length > 0 %> <% d=select_year(2006,:prefix => "year",:discard_type => true) %> <p align="right"><%=d%><%= submit_tag("Ok", :id => ''form-submit-button'') %></p> <table cellpadding="5" cellspacing="0" border="3"...
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/.
2006 Feb 05
0
How can i specify default time to datetime_select tag
...} options = defaults.merge(options) options_with_prefix = Proc.new { |position| options.merge(:prefix => "#{@object_name}[#{@method_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]...
2006 Jan 16
0
Specifying Javascript events for form fields
...ime the user changes their selection in one of several select items (single selection only). I''ve got this behavior working properly in the select_tag method, but I also have two other fields on the form - a month and a year. The month and year tags are created using the select_month and select_year methods, respectively. I tried specifying an :onChange => ''submit()'' option for the year and month methods, but it doesn''t appear to do anything, even though it works with the select_tag methods. Is there a way to do this? I''d hate to have to throw out the...
2006 Sep 27
0
adding id and class to date select helper.. is it possible ?
I need to observe a select_month or select_year tag... as I would like to have an observe_field on them.. is it possible ? if yes how.. if no, is any trick to do it ? thanks a lot kad -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the G...
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
2007 Apr 16
0
Default Year selection for date_select?
Hi, is it posible to tell rails to select a specific year/month/day when using a date_select helper? as mentioned in at http://dev.rubyonrails.org/ticket/6124 things like :select_year => 1960 wont work. Where would be a good location to look for such things when the api doesnt show it? Pascal --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this...
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 Jan 15
4
form inputs resetting on sumbit
I searched for forum for something about this but couldn''t find anything. For example I have this in my view: (you enter start/end dates from dropdowns, pick a category and a report is generated.) <%= start_form_tag :action => ''display_report'' %> From: <%= date_select ''report'', ''date1'' %> <br /> To: <%=
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 15
1
Strange behaviour of dates
...primary_date_of_birth'', :start_year => 1900 %> returns: Showing app/views/app/_edit.rhtml where line #36 raised: undefined method `year'' for "1993-02-05":String /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/ date_helper.rb:222:in `select_year'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/ date_helper.rb:275:in `to_date_select_tag_without_error_wrapping'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/ date_helper.rb:274:in `to_date_select_tag_without_error_wrap...
2009 Feb 26
8
beginners question
...=> ''did'', :name => ''dname'' }) %> <%= select_month( @month, { :disabled => @nodate }, { :id => ''mid'', :name => ''mname'' }) %> <%= select_year( @year, { :disabled => @nodate , :start_year => 2009 }, { :id => ''jid'', :name => ''jname'' }) %></td> </tr> </table> <%=...