app_helpers_application_helper_rb.diff

Path to fix helper function calendar_for - Felipe Cardoso Martins, 2010-05-10 22:18

Download (707 Bytes)

View differences:

app/helpers/application_helper.rb (working copy)
661 661
  def calendar_for(field_id)
662 662
    include_calendar_headers_tags
663 663
    image_tag("calendar.png", {:id => "#{field_id}_trigger",:class => "calendar-trigger"}) +
664
    javascript_tag("Calendar.setup({inputField : '#{field_id}', ifFormat : '%Y-%m-%d', button : '#{field_id}_trigger' });")
664
    javascript_tag("Calendar.setup({inputField : '#{field_id}', ifFormat : '#{Setting.date_format}', button : '#{field_id}_trigger' });")
665 665
  end
666 666
  def include_calendar_headers_tags