Sha256: afc00dc9c6743ddc72e37dc1816461e8f3303ffef8fc07cde05abb6021ec27b9
Contents?: true
Size: 715 Bytes
Versions: 72
Compression:
Stored size: 715 Bytes
Contents
class DatePickerInput < SimpleForm::Inputs::Base def input template.content_tag(:div, class: 'input-group') do template.concat @builder.text_field(attribute_name, input_html_options) template.concat span_table end end def data_attributes attributes = {} attributes.reverse_merge!( date_language: I18n.locale, date_format: 'dd/mm/yyyy' ) end def icon_table template.content_tag(:span, '', class: 'fa fa-th') end def input_html_options super.merge(class: 'form-control', readonly: true, data: data_attributes) end def span_table template.content_tag(:span, class: 'input-group-addon') do template.concat icon_table end end end
Version data entries
72 entries across 72 versions & 1 rubygems