Module: DatePicker::FormHelper::FormBuilderMethods

Defined in:
lib/date_picker/form_helper.rb

Instance Method Summary collapse

Instance Method Details

#date_picker(attribute, options = {}, html_options = {}) ⇒ Object



16
17
18
19
# File 'lib/date_picker/form_helper.rb', line 16

def date_picker(attribute, options = {}, html_options = {})
  html_options[:id]||= DatePicker::FormHelper.field_id(self.object_name, attribute)
  @template.date_picker_tag("#{self.object_name}[#{attribute}]", self.object.send(attribute), options, html_options)
end

#datetime_picker(attribute, options = {}, html_options = {}) ⇒ Object



21
22
23
24
# File 'lib/date_picker/form_helper.rb', line 21

def datetime_picker(attribute, options = {}, html_options = {})
  html_options[:id]||= DatePicker::FormHelper.field_id(self.object_name, attribute)
  @template.datetime_picker_tag("#{self.object_name}[#{attribute}]", self.object.send(attribute), options, html_options)
end

#time_picker(attribute, options = {}, html_options = {}) ⇒ Object



26
27
28
29
# File 'lib/date_picker/form_helper.rb', line 26

def time_picker(attribute, options = {}, html_options = {})
  html_options[:id]||= DatePicker::FormHelper.field_id(self.object_name, attribute)
  @template.time_picker_tag("#{self.object_name}[#{attribute}]", self.object.send(attribute), options, html_options)
end