On Sat, Jun 16, 2012 at 9:41 AM, Ermin Dedovic <ermin.dedovic@gmail.com> wrote:
Hello,
You might want to check out this http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html
:order- Set to an array containing:day,:monthand:yearto customize the order in which the select fields are shown. If you leave out any of the symbols, the respective select will not be shown (like when you set:discard_xxx => true. Defaults to the order defined in the respective locale (e.g. [:year, :month, :day] in the en locale that ships with Rails)- Specifies a string to separate the date fields. Default is "" (i.e. nothing).
:date_separator
Best regardsOn Thu, Jun 14, 2012 at 7:23 PM, Marc C. <lists@ruby-forum.com> wrote:
Hello,
I need to accept dates in a form using a text_field and not a
date_select. Why? Well, because for users it's faster to type a date.
But if I enter a simple date like "13/05/2012" (dd/mm/yyyy format), when
I want to edit this register, in the text_field appears "2012-05-13".
How can I change this behavior, so in the text_field appears
"13/05/2012"?
Thank you!
--
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@googlegroups.com.
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.
--
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@googlegroups.com.
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.
No comments:
Post a Comment