gattox
July 10, 2007, 6:09pm
1
How can I specify a CSS attribute for date_select?
If I write for example:
<%= date_select ‘study’, ‘data_on’, :order => [:day, :month, :year],
:start_year => 1940, :end_year => Time.now.year, :class => “mandatory”
%>
and then look at the generated HTML, I find no evidence of the CSS
attribute.
Any help appreciated.
gattox
July 10, 2007, 8:08pm
2
On Jul 10, 2007, at 11:09 , Roberto Gattinoni wrote:
How can I specify a CSS attribute for date_select?
I don’t believe date_select provides for HTML options. What would it
mean? Apply the same class=“mandatory” to each of the three generated
s? I’d put the class attribute in the parent element of the
date_select.
Michael G.
grzm seespotcode net
gattox
July 10, 2007, 8:18pm
3
Hi Roberto,
Looks like date_select doesn’t take any html_options as a parameter
except in edge rails.
http://dev.rubyonrails.org/ticket/6000
<http://api.rubyonrails.org/classes/ActionView/Helpers/
DateHelper.html#M000577>
Brad.
On Jul 10, 12:09 pm, Roberto Gattinoni <rails-mailing-l…@andreas -
gattox
July 11, 2007, 7:57am
4
Michael G. wrote:
On Jul 10, 2007, at 11:09 , Roberto Gattinoni wrote:
How can I specify a CSS attribute for date_select?
I don’t believe date_select provides for HTML options. What would it
mean? Apply the same class=“mandatory” to each of the three generated
s? I’d put the class attribute in the parent element of the
date_select.
Michael G.
grzm seespotcode net
Not the same thing: try to apply a background-color attribute to the
parent element of a SELECT.
Roberto Gattinoni.
gattox
July 11, 2007, 3:56pm
5
On Jul 11, 2007, at 0:57 , Roberto Gattinoni wrote:
Michael G.
grzm seespotcode net
Not the same thing: try to apply a background-color attribute to the
parent element of a SELECT.
You mean you want to set the background-color of the select rather
then the select’s parent element, correct?
HTML fragment:
bar
baz
CSS:
p.mandatory select { background-color: red }
Michael G.
grzm seespotcode net
gattox
July 11, 2007, 4:16pm
6
Michael G. wrote:
On Jul 11, 2007, at 0:57 , Roberto Gattinoni wrote:
Michael G.
grzm seespotcode net
Not the same thing: try to apply a background-color attribute to the
parent element of a SELECT.
You mean you want to set the background-color of the select rather
then the select’s parent element, correct?
HTML fragment:
bar
baz
CSS:
p.mandatory select { background-color: red }
Michael G.
grzm seespotcode net
… sounds good (better a cause is a block-level element and
forces a new-line).
Thanks for the suggestion.
Roberto Gattinoni.
gattox
July 10, 2007, 8:32pm
7
On Jul 10, 2007, at 13:18 , Brad C. wrote:
Looks like date_select doesn’t take any html_options as a parameter
except in edge rails.
http://dev.rubyonrails.org/ticket/6000
The ticket is still open: this hasn’t been applied and therefore
isn’t in Edge.
Michael G.
grzm seespotcode net
gattox
July 11, 2007, 5:15pm
8
On Jul 11, 2007, at 9:16 , Roberto Gattinoni wrote:
… sounds good (better a cause is a block-level element
and
forces a new-line).
p.mandatory { display:inline }
Michael G.
grzm seespotcode net