Sha256: 9245032f7050a1d77ba07b256fdb7080ae2a7d9f3a1e4714b62858b06404f3af

Contents?: true

Size: 518 Bytes

Versions: 2

Compression:

Stored size: 518 Bytes

Contents

require 'rails'
require 'administrate/field/text'
require 'administrate/engine'
require 'flatpickr_rails'

module Administrate
  module Field
    class DatePicker < Administrate::Field::Text
      class Engine < ::Rails::Engine
        Administrate::Engine.add_javascript 'administrate-field-date_picker/application'
        Administrate::Engine.add_stylesheet 'administrate-field-date_picker/application'
      end

      def ldate(options = {})
        data ? I18n.l(data, options) : nil
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
administrate-field-date_picker-0.2.0 lib/administrate/field/date_picker.rb
administrate-field-date_picker-0.1.0 lib/administrate/field/date_picker.rb