[SOLVED]

don't know if it's the best solution, but it worked...
changed the date text_fields to text_field_tag, on output , set the
value in the controller, with I18n and local format
>> @start_shooting_date = I18n.l( @project[:start_shooting_date], :format => 
>> "%d/%m/%Y")

then on input , set the attribute value from the form field in the
controller, with I18n and local format
>> @project = Project.new(params[:project])  # on create
>> @project.attributes = params[:project] # on update
>> @project[:start_shooting_date] =  
>> I18n.l(params[:start_shooting_date].to_date, :format => "%d/%m/%Y")
>> if @project.save
this way, the dates are correctly saved in the DB with the
standard :db format but input/output in the form is in local format
"dd/mm/yyyy" ( also defined like this in localized DatePicker

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to