module Formtastic::DatePicker
Protected Instance Methods
date_picker_input(method, options = {})
click to toggle source
# File lib/formtastic_datepicker_inputs.rb, line 19 def date_picker_input(method, options = {}) format = options[:format] || DATE_FORMATS[:default] || '%d %b %Y' string_input(method, date_picker_options(format, object.send(method)).merge(options)) end
date_picker_options(format, value = nil)
click to toggle source
Generate html input options for the datepicker_input
# File lib/formtastic_datepicker_inputs.rb, line 26 def date_picker_options(format, value = nil) {:input_html => {:class => 'ui-date-picker',:value => value.try(:strftime, format)}} end