Sha256: 9a2113350963be26cf4abc73d6b5e3fba5889a6ce25b64a8b45cb1634cb333dd

Contents?: true

Size: 551 Bytes

Versions: 21

Compression:

Stored size: 551 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbForm
    module FormBuilder
      module DatePickerField
        def date_picker(name, props: {})
          prefix = @object_name
          html_attribute_name = "#{prefix}[#{name}]"
          html_id = "#{prefix}_#{name}"
          props[:label] = @template.label(@object_name, name) if props[:label] == true

          props[:name] = html_attribute_name
          props[:picker_id] = html_id

          @template.pb_rails("date_picker", props: props)
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
playbook_ui-7.4.0.pre.alpha6 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.4.0.pre.alpha4 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.4.0.pre.alpha2 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.4.0.pre.alpha1 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.3.0.pre.alpha12 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.3.0.pre.alpha11 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.3.0.pre.alpha10 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.3.0.pre.alpha9 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.3.0.pre.alpha8 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.3.0.pre.alpha7 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.3.0.pre.alpha3 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.3.0.pre.alpha1 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.2.0 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.1.2 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.1.0.pre.alpha2 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.1.1.pre.alpha1 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.1.1 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.1.0.pre.alpha1 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.1.0 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb
playbook_ui-7.0.1.pre.alpha15 app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb