Module: BootstrapDatepickerTag::Helper
- Defined in:
- lib/app/helper.rb
Constant Summary collapse
- DEF_OPTS =
{ size: 30 }
Instance Method Summary collapse
Instance Method Details
#datepicker_input_tag(name, value = nil, opts = {}) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/app/helper.rb', line 7 def datepicker_input_tag(name, value = nil, opts = {}) = DEF_OPTS.merge(opts) , = () html = text_field_tag(name, value, ) method = "datepicker" html += javascript_tag "jQuery(document).ready(function(){jQuery('##{name}').#{method}(#{.to_json})});", type: "text/javascript" html.html_safe end |