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