Method: ActionView::Helpers::FormTagHelper#datetime_field_tag

Defined in:
actionview/lib/action_view/helpers/form_tag_helper.rb

#datetime_field_tag(name, value = nil, options = {}) ⇒ Object

Creates a text field of type “datetime”.

Options

  • :min - The minimum acceptable value.

  • :max - The maximum acceptable value.

  • :step - The acceptable value granularity.

  • Otherwise accepts the same options as text_field_tag.



600
601
602
# File 'actionview/lib/action_view/helpers/form_tag_helper.rb', line 600

def datetime_field_tag(name, value = nil, options = {})
  text_field_tag(name, value, options.stringify_keys.update("type" => "datetime"))
end

Comments