I''m trying to display and edit dates without using select boxes (which we don''t like from a UI perspective) and without displaying the date values in MySQL date format (i.e., YYYY-MM-DD). My preference would be to have a text input that displays the date in MM/DD/YYYY format. And when the data is updated or created, it would be saved to the database in the proper MySQL format. Is this a case where I should build my own solution, probably by extending the text_field function. Or is there a built-in solution that I''m missing? Thanks, Ian --~--~---------~--~----~------------~-------~--~----~ 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 Dec 14, 2007 4:47 PM, Ian <ian.m.whitney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m trying to display and edit dates without using select boxes (which > we don''t like from a UI perspective) and without displaying the date > values in MySQL date format (i.e., YYYY-MM-DD).I seem to remember a railscast dealing with this. take a look at http://railscasts.com/episodes/32 and see if it helps. - Martin (my first post here, hello everybody) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Check out the calendar_date_select plugin. http://bparanj.blogspot.com/2007/10/extremely-simple-calendar-integration.html On Dec 14, 2007 7:47 AM, Ian <ian.m.whitney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m trying to display and edit dates without using select boxes (which > we don''t like from a UI perspective) and without displaying the date > values in MySQL date format (i.e., YYYY-MM-DD). > > My preference would be to have a text input that displays the date in > MM/DD/YYYY format. And when the data is updated or created, it would > be saved to the database in the proper MySQL format. > > Is this a case where I should build my own solution, probably by > extending the text_field function. Or is there a built-in solution > that I''m missing? > > Thanks, > > Ian > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
That railscast worked perfectly for me. Thanks! The calendar plugin looks good too. I can see using that elsewhere in this application. On Dec 15, 10:25 am, "Martin Svalin" <martin.sva...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Dec 14, 2007 4:47 PM, Ian <ian.m.whit...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I''m trying to display and edit dates without using select boxes (which > > we don''t like from a UI perspective) and without displaying the date > > values in MySQL date format (i.e., YYYY-MM-DD). > > I seem to remember a railscast dealing with this. > > take a look athttp://railscasts.com/episodes/32and see if it helps. > > - Martin (my first post here, hello everybody)--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---