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. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 <select>s? I''d put the class attribute in the parent element of the date_select. Michael Glaesemann grzm seespotcode net --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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- s.net> wrote:> 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. > > -- > Posted viahttp://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 10, 2007, at 13:18 , Brad Carson 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 Glaesemann grzm seespotcode net --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Glaesemann 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 > <select>s? I''d put the class attribute in the parent element of the > date_select. > > Michael Glaesemann > grzm seespotcode netNot the same thing: try to apply a background-color attribute to the parent element of a SELECT. Roberto Gattinoni. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 11, 2007, at 0:57 , Roberto Gattinoni wrote:> > Michael Glaesemann 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 >> <select>s? I''d put the class attribute in the parent element of the >> date_select. >> >> Michael Glaesemann >> 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: <p class="mandatory"> <select name="foo"> <option value="bar">bar</option> <option value="baz">baz</option> </select> </p> CSS: p.mandatory select { background-color: red } Michael Glaesemann grzm seespotcode net --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Glaesemann wrote:> On Jul 11, 2007, at 0:57 , Roberto Gattinoni wrote: > >>> >>> Michael Glaesemann >>> 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: > <p class="mandatory"> > <select name="foo"> > <option value="bar">bar</option> > <option value="baz">baz</option> > </select> > </p> > > CSS: > p.mandatory select { background-color: red } > > Michael Glaesemann > grzm seespotcode net... sounds good (better a <span> cause <p> is a block-level element and forces a new-line). Thanks for the suggestion. Roberto Gattinoni. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 11, 2007, at 9:16 , Roberto Gattinoni wrote:> ... sounds good (better a <span> cause <p> is a block-level element > and > forces a new-line).p.mandatory { display:inline } Michael Glaesemann grzm seespotcode net --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---