ngollan-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Dec-26 14:41 UTC
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 approximately a hundred entries). Is there a way to do that without manually hardcoding form fields in the view? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Martin Svalin
2007-Dec-26 18:26 UTC
Re: Overriding or changing HTML generated by date_select?
On Dec 26, 2007 3:41 PM, ngollan-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org <ngollan-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> I''m looking for a way to customize the HTML forms generated by > date_select.You can hack ActiveView::Helpers::DateHelper if you''d like, or wrap date_select in a helper of your own and manipulate the output there, but I suspect you''ll do just as well without it. Take a look at this railscast: http://railscasts.com/episodes/32 I think Ryan Bates shows how to do almost exactly what you want. - Martin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
ngollan-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Dec-27 18:28 UTC
Re: Overriding or changing HTML generated by date_select?
On Dec 26, 7:26 pm, "Martin Svalin" <martin.sva...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Dec 26, 2007 3:41 PM, ngol...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org <ngol...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > I''m looking for a way to customize the HTML forms generated by > > date_select....> > Take a look at this railscast:http://railscasts.com/episodes/32Thanks a lot, that looks like a good point to start from. They need to make those casts more search-friendly in some way, all that web searches turned up were JScript calendars. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---