4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/formtastic_jquery_ui/datepicker.rb', line 4
def datepicker_input(method, options)
html_options = options.delete(:input_html) || {}
html_options = default_string_options(method, type).merge(html_options) if [:numeric, :string, :password, :text].include?(type)
self.label(method, options_for_label(options)) <<
self.send(:text_field, method, html_options) <<
template.content_tag(:script, :type => 'text/javascript') do
" $('#\#{sanitized_object_name}_\#{method}').datepicker({dateFormat: 'yy-mm-dd'}); \n"
end
end
|