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.59 app/inputs/admin_date_input.rb
carnival-0.0.58 app/inputs/admin_date_input.rb
carnival-0.0.57 app/inputs/admin_date_input.rb
carnival-0.0.56 app/inputs/admin_date_input.rb
carnival-0.0.55 app/inputs/admin_date_input.rb
carnival-0.0.54 app/inputs/admin_date_input.rb
carnival-0.0.53 app/inputs/admin_date_input.rb
carnival-0.0.52 app/inputs/admin_date_input.rb
carnival-0.0.51 app/inputs/admin_date_input.rb
carnival-0.0.50 app/inputs/admin_date_input.rb
carnival-0.0.49 app/inputs/admin_date_input.rb
carnival-0.0.48 app/inputs/admin_date_input.rb
carnival-0.0.47 app/inputs/admin_date_input.rb
carnival-0.0.45 app/inputs/admin_date_input.rb
carnival-0.0.44 app/inputs/admin_date_input.rb
carnival-0.0.43 app/inputs/admin_date_input.rb
carnival-0.0.42 app/inputs/admin_date_input.rb
carnival-0.0.41 app/inputs/admin_date_input.rb
carnival-0.0.40 app/inputs/admin_date_input.rb
carnival-0.0.39 app/inputs/admin_date_input.rb