Class: ActionView::Helpers::InstanceTag

Inherits:
Object
  • Object
show all
Includes:
UnobtrusiveDatePicker::OptionParser, UnobtrusiveDatePicker::UnobtrusiveDatePickerHelper
Defined in:
lib/unobtrusive_date_picker.rb

Instance Method Summary collapse

Methods included from UnobtrusiveDatePicker::UnobtrusiveDatePickerHelper

#unobtrusive_date_picker, #unobtrusive_date_picker_tags, #unobtrusive_date_text_picker, #unobtrusive_date_text_picker_tag, #unobtrusive_datetime_picker, #unobtrusive_datetime_picker_tags

Instance Method Details

#to_datepicker_date_select_tag(options = {}, html_options = {}) ⇒ Object



339
340
341
# File 'lib/unobtrusive_date_picker.rb', line 339

def to_datepicker_date_select_tag(options = {}, html_options = {})
  datepicker_selector(options, html_options).select_date
end

#to_datepicker_datetime_select_tag(options = {}, html_options = {}) ⇒ Object



343
344
345
# File 'lib/unobtrusive_date_picker.rb', line 343

def to_datepicker_datetime_select_tag(options = {}, html_options = {})
  datepicker_selector(options.merge(:twelve_hour => true), html_options).select_datetime
end

#to_datepicker_text_tag(options = {}, html_options = {}) ⇒ Object



347
348
349
350
351
352
# File 'lib/unobtrusive_date_picker.rb', line 347

def to_datepicker_text_tag(options = {}, html_options = {})
  options = merge_defaults_for_text_picker(options)
  html_options[:class] = get_html_classes_for_datepicker(options, html_options[:class])
  html_options[:value] = format_date_value_for_text_field(value(object), options[:format], options[:divider])
  to_input_field_tag('text', html_options)
end