Sha256: 0ab8a89b32a731ba4013bfd6b8233d5e507fd6bb61a407c6b1f47ab9ae0cd757

Contents?: true

Size: 341 Bytes

Versions: 2

Compression:

Stored size: 341 Bytes

Contents

# -*- encoding : utf-8 -*-
module RademadeAdmin
  class DateTimeInput < SimpleForm::Inputs::DateTimeInput

    def input
      @builder.text_field(attribute_name, input_html_options.merge({
        :data => { 'date-time-picker' => '' },
        :value => object.send(attribute_name).try(:strftime, '%d.%m.%Y %R')
      }))
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rademade_admin-0.1.1 app/inputs/rademade_admin/date_time_input.rb
rademade_admin-0.1.0 app/inputs/rademade_admin/date_time_input.rb