Sha256: 684c82a6c9490f4e755511ccdc1920a0b06132b2c858171a3ef89572867a071b

Contents?: true

Size: 653 Bytes

Versions: 10

Compression:

Stored size: 653 Bytes

Contents

require 'rails_admin/config/fields/types/datetime'

module RailsAdmin
  module Config
    module Fields
      module Types
        class Date < RailsAdmin::Config::Fields::Types::Datetime
          # Register field type for the type loader
          RailsAdmin::Config::Fields::Types.register(self)

          @format = :long
          @i18n_scope = [:date, :formats]
          @js_plugin_options = {
            'showTime' => false,
          }

          def parse_input(params)
            params[name] = self.class.normalize(params[name], localized_date_format).to_date if params[name].present?
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/rails_admin-0.7.0/lib/rails_admin/config/fields/types/date.rb
rails_admin-0.7.0 lib/rails_admin/config/fields/types/date.rb
rails_admin-0.6.8 lib/rails_admin/config/fields/types/date.rb
rails_admin-0.6.7 lib/rails_admin/config/fields/types/date.rb
rails_admin-0.6.6 lib/rails_admin/config/fields/types/date.rb
rails_admin-0.6.5 lib/rails_admin/config/fields/types/date.rb
rails_admin-0.6.4 lib/rails_admin/config/fields/types/date.rb
rails_admin-0.6.3 lib/rails_admin/config/fields/types/date.rb
rails_admin-0.6.2 lib/rails_admin/config/fields/types/date.rb
rails_admin-0.6.1 lib/rails_admin/config/fields/types/date.rb