Hi I have 2 question for you guys, 1. Which is the difference between this two methods? (select_datetime, datetime_select) 2. How I assign the selected date-time values, to an specific variable or array using select_datetime I know do it using datetime_select(''object'',''method'') I aprecciate your attention. Thanks PD: Sorry about my english. --~--~---------~--~----~------------~-------~--~----~ 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 Sat, Jul 5, 2008 at 8:48 AM, gianpero <gianpero-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi I have 2 question for you guys, > 1. Which is the difference between this two methods? (select_datetime, > datetime_select)One you use along with the form_for type form helpers. <% form_for @post do |f| -%> <%= f.datetime_select :post_date -%> <%- end -%> The other you use if you just want a datetime picker in a form <form.......> <%= select_datetime Time.now -%> </form>> 2. How I assign the selected date-time values, to an specific variable > or array using select_datetime > I know do it using datetime_select(''object'',''method'')<%= select_datetime Time.now -%> <%= f.datetime_select :post_date, :default => Time.now -%> Regards Mikel -- http://lindsaar.net/ Rails, RSpec and Life blog.... --~--~---------~--~----~------------~-------~--~----~ 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 Mikel, thanks for your response, But, I still don''t understand how asign the value using select_datetime, For example, If I have <=%datetime_select ''reservation'',''start_at''%> How I do the same, using select_datetime. Another additional question, I am developing an application in spanish, so I need the months in spanish. There is some option that allow me do it, or I have to modified the date_helper and copy the method as a application_helper?? thanks again. On 5 jul, 01:42, "Mikel Lindsaar" <raasd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jul 5, 2008 at 8:48 AM, gianpero <gianp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi I have 2 question for you guys, > > 1. Which is the difference between this two methods? (select_datetime, > > datetime_select) > > One you use along with the form_for type form helpers. > > <% form_for @post do |f| -%> > <%= f.datetime_select :post_date -%> > <%- end -%> > > The other you use if you just want a datetime picker in a form > > <form.......> > <%= select_datetime Time.now -%> > </form> > > > 2. How I assign the selected date-time values, to an specific variable > > or array using select_datetime > > I know do it using datetime_select(''object'',''method'') > > <%= select_datetime Time.now -%> > <%= f.datetime_select :post_date, :default => Time.now -%> > > Regards > > Mikel > > --http://lindsaar.net/ > Rails, RSpec and Life blog....--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mon, Jul 7, 2008 at 3:02 AM, gianpero <gianpero-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> thanks for your response, > But, I still don''t understand how asign the value using > select_datetime, > > For example, > If I have <=%datetime_select ''reservation'',''start_at''%> > How I do the same, using select_datetime.You need to assign a name to it per the HTML standards for form elements. If you look at the RDoc for ActionView::Helpers::DateHelper it will give you what you need. Especially the first paragraph about the :prefix option.> Another additional question, I am developing an application in > spanish, so I need the months in spanish. There is some option that > allow me do it, or I have to modified the date_helper and copy the > method as a application_helper??Go have a look at the globalize plugin. Very cool. I use it for multi language apps. http://www.artweb-design.de/2006/11/10/get-on-rails-with-globalize-comprehensive-writeup -- http://lindsaar.net/ Rails, RSpec and Life blog.... --~--~---------~--~----~------------~-------~--~----~ 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, thanks again for your answers. I try the globalize plugin, but it doesn''t work with my application, i think the problem is that I use RoR 2.1. Finally I use Globalite, a similar plugin very cool ans easy too. Maybe you want to get a view. Thanks again. On 6 jul, 19:40, "Mikel Lindsaar" <raasd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mon, Jul 7, 2008 at 3:02 AM, gianpero <gianp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > thanks for your response, > > But, I still don''t understand how asign the value using > > select_datetime, > > > For example, > > If I have <=%datetime_select ''reservation'',''start_at''%> > > How I do the same, using select_datetime. > > You need to assign a name to it per the HTML standards for form elements. > > If you look at the RDoc for ActionView::Helpers::DateHelper it will > give you what you need. Especially the first paragraph about the > :prefix option. > > > Another additional question, I am developing an application in > > spanish, so I need the months in spanish. There is some option that > > allow me do it, or I have to modified the date_helper and copy the > > method as a application_helper?? > > Go have a look at the globalize plugin. Very cool. I use it for > multi language apps. > > http://www.artweb-design.de/2006/11/10/get-on-rails-with-globalize-co... > > --http://lindsaar.net/ > Rails, RSpec and Life blog....--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---