Sha256: b27017aeba7c83397b0a92b3dcf51a2266c79f65328c3a4d70d33a7ce2334cee
Contents?: true
Size: 993 Bytes
Versions: 34
Compression:
Stored size: 993 Bytes
Contents
module FlexaLib module Inputs class DatePickerInput < Formtastic::Inputs::StringInput def to_html input_wrapping do options[:lookup].inspect if options[:lookup].present? label_html << builder.text_field(options[:lookup][:display], input_html_options) << template.link_to(options[:lookup][:display],options[:lookup][:path],{:target=>"_blank",:class=>"btn"})<< builder.hidden_field(method, {}) end end def label_html_options {}.tap do |opts| opts[:for] ||= input_html_options[:id] opts[:class] = [opts[:class]] end end #def input_html_options # super.reject { |k, v| [:min, :max, :step].include?(k) } #end def wrapper_html_options super.merge(:class => "#{super[:class]} datePicker" ) end def input_html_options super.merge(:class => "datePicker") end end end end
Version data entries
34 entries across 34 versions & 1 rubygems