Sha256: 3a39c04b6ae3cc03e89a7d13e76516f361f2047d7870347134afe895054884fe
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
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[:label] = "Date Picker" if props[:label].nil? props[:name] = html_attribute_name props[:picker_id] = html_id input = text_field( name, autocomplete: "off", disabled: props[:disable_input], data: props[:input_data], aria: props[:input_aria], props: { error: props[:error], label: props[:hide_label] ? nil : props[:label], placeholder: props[:placeholder], required: props[:required], } ) puts " #{props} " @template.pb_rails("date_picker", props: props) do input end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
playbook_ui-7.3.0.pre.alpha6 | app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb |