similar to: not showing dates < Date.today in date_select

Displaying 20 results from an estimated 60000 matches similar to: "not showing dates < Date.today in date_select"

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/.
2007 Oct 13
5
default date for date_select
Hi, How can I set a default date for a date_select? I''m trying to do something along the lines of: <%= date_select("requirement", "target_date", :end_year => 2020, :discard_day => true, :include_blank => true, :order => [:month, :year], :default => {:month => 10, :year => 2012 }) %> but the default that comes up on the form is blank month
2008 Oct 31
3
Date_select vs wrong date weird behavior
In my date_select if I choose 31 april 2008, it converts it for 1st may 2008 which it seems odd for me? I say odd because first its difficult to validate at the model level, I have to hook some code in the controller and secondly when I finally get the validation errors I have to go back at the edit page and show the selected date(and the error message) which should be 31 april 2008 but the date
2009 Mar 15
0
Forms with date_select: How to set/leave a date to NULL?
Hi, minor question: If I create a form where some entries are of type date (i.e. use the form.date_select to create the form field), it does not allow to enter a NULL date. Even if the user does not enter anything, it forces a NULL date to become today''s date. Is there any (simple) way to give a date a NULL choice? regards Hadmut --~--~---------~--~----~------------~-------~--~----~
2007 Jan 11
5
how to have default date for date_select
lo there all, i want to have a date_select heper default to the year 2006, but cant seem to find out how to pull it off. any takers ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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
2006 Jun 13
0
date_select and date validation
Hi, I''ve put together a simple form that contains among other things a date_select: <%= date_select(:user, :dob, :order => [:day, :month, :year], :start_year => 1900, :end_year => Date.today.year) %> In my controller I have some code to create a user entity from the parameters posted up from the form, like so: parameters:
2006 Jun 30
0
storing dates from a date_select does not work
Hi there I''m having problems storing dates in a DB(postgreSQL) I have the field dtmfechanac of type date I have this in the view <%= date_select ''usuario'', ''dtmfechanac'', :start_year => 1900 %> and I have this in te controller data = { "dtmfechanac" => params[:usuario][:dtmfechanac] "dtmfechainicio" =>
2005 Dec 18
1
date_select and impossible dates....
hi, using date_select right from a generated scaffold code leads to an error if an impossible date is selected (like the 31 of february) can''t get a way to correct this via a validation.... in fact that make sens because in the model i have the ''dateofbirth'' object which is a date object.... so providing an impossible day-month-year trio leads to an impossible
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
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 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
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
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" %>
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/.
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 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 error.
2006 Nov 18
0
date_select-like functionality for phone numbers
Hi all, I''m trying to achieve something similar to what date_select does but for a phone number field. Whats the best way (or can you point me to the date_select related code) to do this? Thanks! Abdullah --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2007 Jul 04
0
Multiple date_select
Hi, I tried to create 2 date fields with date_select in ruby. But the names assigned to the two date fields are the same(date[year], date[month] and date[day] for both) when I view the page source. Is there any way to assign a different name to the second date_select field? Or in what else way can we use two date fields in a form? Please help. Thanks -- Posted via
2006 Jan 07
4
set date with date_select
when retreiving a date from a DATETIME field in a database, is there a way to set the date to the value of the DB in the view? It seems to always default to the current date... if I have a field called birthdate in the users table and i do @user = User.find(@params[:id]) in my view i have a <%= date_select ''birthdate'',''user'' %> but dont know how to
2006 Feb 28
1
RoR date_select() default date
Hi, I''m trying to use the date_select() function of ruby on rails, but I want my form easier to use and I want to put an explicit default date. I don''t kow how to do that. I can''t find any information about default on the web, and no example either. Let me know if there is a tips that I don''t know... -- Posted via http://www.ruby-forum.com/.