Sha256: 6ecbfb24615889bd0ba2433beb4362daa429587e7174cab57ecba5c456e9d001

Contents?: true

Size: 420 Bytes

Versions: 29

Compression:

Stored size: 420 Bytes

Contents

class AdminDateInput < SimpleForm::Inputs::Base

  include AdminBaseInput

  def input
    default_input_html_options = {class: 'datepicker',
      value: @builder.object.send(attribute_name).nil? ? "" : @builder.object.send(attribute_name).strftime('%d/%m/%Y')}
    options = merge_options(default_input_html_options, input_html_options)
    return "#{@builder.text_field(attribute_name, options)}".html_safe
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
carnival-0.0.38 app/inputs/admin_date_input.rb
carnival-0.0.37 app/inputs/admin_date_input.rb
carnival-0.0.36 app/inputs/admin_date_input.rb
carnival-0.0.35 app/inputs/admin_date_input.rb
carnival-0.0.34 app/inputs/admin_date_input.rb
carnival-0.0.33 app/inputs/admin_date_input.rb
carnival-0.0.26 app/inputs/admin_date_input.rb
carnival-0.0.11 app/inputs/admin_date_input.rb
carnival-0.0.10 app/inputs/admin_date_input.rb