开发者

Format date in nested form

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜