Forum: Rails I18n text_field as date

F87d150876b608711d5fc8154a8038c9?d=identicon&s=25 Herman Müller (gotzbold)
on 2009-05-24 16:54
Hi Ruby Comuniy!

I have implemented i18n and when I set the locale to "de" everthing
works fine, I mean date_select shows the german date-format.

The problem is, that I want to use a text_field for date-input like:

<%= f.text_field :date_test %>

But when I open the edit.html.erb the date-output is not the "de-fromat"
like 31.12.2008 it is the database format like 2008-12-31.

I tried something like

<%=  l f.text_field :date_test %>

but then I get this error message:

"Object must be a Date, DateTime or Time object"

Do somebody knows a solution?

Thanks ahead!!!

Regs Hermann
This topic is locked and can not be replied to.