Sha256: 637225f11828592807c82ed250a6346e816fb5a400eb4be630026d4708d89324

Contents?: true

Size: 557 Bytes

Versions: 19

Compression:

Stored size: 557 Bytes

Contents

module Plugins
  module Core
    class DateTimeCell < Plugins::Core::Cell
      def datepicker
        render
      end

      private

      def value
        data&.[]('timestamp') || @options[:default_value]
      end

      def render_label
        @options[:form].label :data, field.name, class: 'mdl-textfield__label'
      end

      def render_datepicker
        @options[:form].text_field 'data[timestamp]', value: value, placeholder: @options[:placeholder], class: 'datepicker mdl-textfield__input', required: required?
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
cortex-plugins-core-3.2.0 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-3.1.0 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-3.0.0 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-2.1.1 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-2.1.0 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-2.0.1 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-1.1.1 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-1.1.0 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-1.0.0 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-0.12.4 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-0.12.3 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-0.12.2 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-0.12.1 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-0.12.0 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-0.11.3 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-0.11.2 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-0.11.1 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-0.11.0 app/cells/plugins/core/date_time_cell.rb
cortex-plugins-core-0.10.4 app/cells/plugins/core/date_time_cell.rb