Module: ActiveScaffold::Bridges::DatePickerBridge::FormColumnHelpers

Defined in:
lib/active_scaffold/bridges/date_picker/lib/datepicker_bridge.rb

Instance Method Summary collapse

Instance Method Details

#active_scaffold_input_date_picker(column, options) ⇒ Object



195
196
197
198
199
200
201
202
203
# File 'lib/active_scaffold/bridges/date_picker/lib/datepicker_bridge.rb', line 195

def active_scaffold_input_date_picker(column, options)
  options = active_scaffold_input_text_options(options.merge(column.options))
  options[:class] << " #{column.form_ui.to_s}"
  value = controller.class.condition_value_for_datetime(@record.send(column.name), column.form_ui == :date_picker ? :to_date : :to_time)
  format = options.delete(:format) || :default
  datepicker_format_options(column, format, options)
  options[:value] = (value ? l(value, :format => format) : nil)
  text_field(:record, column.name, options)
end