Displaying 20 results from an estimated 1000 matches similar to: "date_select where to add "class"=>"something""
2005 Jan 29
4
format question
how can I get a float to always print two decimal places?
Thanks,
Jamie
2008 Feb 24
3
1 error(s) on assignment of multiparameter attributes
I am trying to create a form for processing credit cards. For the
credit card expiration date, I would like to leave the day field out
of the form for obvious reasons. However, the following code is
producing an error for me.
Any ideas?
Thanks!
<p><label for="email">Expiration</label><br/>
<input type="hidden" id="user_card_expiration_3i"
2005 Nov 13
2
Link_to :protocol and :host?
Hello,
I am trying to set the protocol and host in link_to based on the
documentation.
I have the following:
<%= link_to "View Cart", {:controller => ''store'', :action => ''view_cart'',
:protocol => ''https://'', :host => ''secure.host.com''} %>
I would expect this to generate a https link to another
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
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 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
2007 Jun 13
3
date_select css options
Just looked at the Date helper in the rails API and noticed that none
of the functions there (i.e. date_select) allow me to specify html
options (i.e. class) for the generated selects.
I was wondering how do other group members css format date select
dropdowns?
Best,
Gabor
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2005 Jan 17
5
how to override rails errors messages?
hi,
how can i override rails errors mesages (that are in english) to
display them in an other language?
thanks
hangon
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 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
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
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 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/.
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
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 = ?",
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" %>
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
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