similar to: Default Year selection for date_select?

Displaying 20 results from an estimated 6000 matches similar to: "Default Year selection for date_select?"

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(
2007 Dec 26
2
Overriding or changing HTML generated by date_select?
Hi, I''m looking for a way to customize the HTML forms generated by date_select. I''m especially keen on replacing the year and possibly day input by a simple text field, since honestly, I find listboxes for years to be quite retarded (if I wanted client-side validation, there would be better ways to do that instead of having people try and find their year of birth in a list of
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 Sep 12
1
How to use a text box instead a lis for year in date_select
Hi, I have a date_select in my application and is used to select birth date of authers. So it is quite long list of years in drop down list and seems not practical. I want to have month and date drop downs as it is and to use a text box to enter only the year. Is it possible with date_select? Thank you. Sameera -- Posted via http://www.ruby-forum.com/.
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
2010 Jul 31
5
date_select Year as a text_field
Hey all, Using date_select in a form, how can I make the Year field a text_field instead of a select? It looks like it will take more than a simple modification of the date_select method. Thanks in advance. Cam -- 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
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 Dec 10
2
set specific date with date_select
Hi All I seem to have a problem with date_select methods. I cannot set a default date. I tried the following: <%= date_select( "post", "written_on", :selected => Date.new(2005,3,31), :order => [:day, :month, :year] ) %> But still I get todays date :( Any suggestions what I do wrong here ? Thnx a lot LuCa -- Posted via http://www.ruby-forum.com/.
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
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
2005 Dec 15
1
date_select help
I''m trying to select items from a database by their date field. The date data is coming from a form using the date_select helper. The field in the database is named date_notified_on. My controller method is this: def history_date if(@params) @notifications = Notification.find(:all, :conditions => ["date_notified_on = ?",
2006 May 09
0
Problem with date_select
Dates defined chosen with date_select are not coming through once the form is submitted. I have this in a form: <%= date_select ''search'', ''date_start'', :include_blank => true %> <%= date_select ''search'', ''date_end'' , :include_blank => true %> However, when I submit the form params[:search][:date_start]
2006 Apr 04
0
Does observe_field work with date_select?
I can''t get observe_field to do anything with my date_select. Here''s the rhtml code: <%= date_select ''course'', ''lab_start_date'' %> <%= observe_field(:course_lab_start_date, :frequency => 0.5, :update => :course_lab_start_date_div, :url => { :action => ''preview_text''}) %> My
2008 Jun 17
0
how to set tabindex in date_select
<%= date_select(''user'', ''birthdate'', { :start_year => 80.years.ago.year, :end_year => 12.years.ago.year } ) %> work in rails 1.2.2 date_select(object_name, method, options = {}) I try many times but also didn''t know how to set tabindex in date_select --~--~---------~--~----~------------~-------~--~----~ You received this message
2005 Sep 16
0
Specify attributes for 'date_select' select inputs
Hi, I could not find an easy way to specify the ''id'' attribute for select inputs of ''date_select'' form helper. I need to set it because I want to retrieve date selects values from a javascript. <%= date_select ''product'', ''expiration'' %> generates <select name="product[expiration(1i)]">
2005 Feb 15
5
date_select where to add "class"=>"something"
Hi, I''ve looked on api.rubyonrails.org but I''ve not found how to add to a date_select(object, method, options = {}) a class option to set the class of all the select tags. I''ve tried using "class" => "myclass" in thoose ways: <%= date_select("costo", "data", "class" => "testo" ) %> <%=
2006 Sep 28
0
:order => [:day, :month, :year] with date_select
I still get the year month day display using this option.. (Rails 1.1.6) I thought a patch solved it.... not yet included in this version ? is also the option :discard => :day included or not ? (I need a date selection with only month and year) thanks fir your info kad -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this
2006 Apr 10
1
Bizzare Date, DateTime, date_select issues
I''ve been banging my head against this wall for several hours, and it hurts now so I''ll stop and ask someone. In one of my forms I had been using a statement to extract the current year for use with some form field calculations. <% currentyear = DateTime.now.year %> And then further down several date_selects like the following, <%= date_select
2005 Apr 20
1
default date in date_select?
Hi there, I''m new to Rails -- started with this project just about five days ago -- I''m re-building an in-house ordering tool, and it would be handy to pre-populate a date_select field with a value two weeks from now. The calculation isn''t the hard part, it''s getting date_select to pre-populate itself. Any suggestions? Thanks, --Jim
2009 Mar 13
2
date_select and HTML options?
I have the following code, but can''t seem to get the class attribute to show up in the generated select elements. I saw something about a bug/patch. However, as am still learning RoR I didn''t want to jump to conclusions. Anyone see anything wrong: <%= f.date_select :expiration_date, :order => [:month, :year], :discard_day => true, :class => "dtfld" %>