Sha256: d73825d9c7df9dd462f7ace5c62cba29a600f818ef73ffaeea110babab22cc6c

Contents?: true

Size: 371 Bytes

Versions: 9

Compression:

Stored size: 371 Bytes

Contents

class DatepickerInput < SimpleForm::Inputs::Base
  def input
    "#{@builder.text_field(attribute_name, input_html_options.merge(datepicker_options(object.send(attribute_name))))}".html_safe
  end

  def datepicker_options(value = nil)
    datepicker_options = {:class => 'input-small datepicker string', :value => value.nil?? nil : value.strftime("%d/%m/%Y")}
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bookkeeper-0.0.7 app/inputs/datepicker_input.rb
bookkeeper-0.0.6 app/inputs/datepicker_input.rb
bookkeeper-0.0.5 app/inputs/datepicker_input.rb
bookkeeper-0.0.4 app/inputs/datepicker_input.rb
bookkeeper-0.0.3 app/inputs/datepicker_input.rb
bookkeeper-0.0.2 app/inputs/datepicker_input.rb
bookkeeper-0.0.1 app/inputs/datepicker_input.rb
bookkeeper-0.0.1.beta2 app/inputs/datepicker_input.rb
bookkeeper-0.0.1.beta1 app/inputs/datepicker_input.rb