I've tried this
<%= builder.text_field (:start_date).strftime('%a'), :disabled => true, :class => 'input_date_field' %>
and this
module DatesHelper
def form开发者_开发问答atted_to_day(start_date)
start_date.strftime("%a")
end
end
<%= builder.text_field formatted_to_day(:start_date), :disabled => true, :class => 'input_date_field' %>
all to no avail.
Here is the best resource I know of to help point you in the right direction. http://railscasts.com/episodes/31-formatting-time
精彩评论