diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index 47d4c04b0971dbfc5de509f9eec1b76bd7597dd8..3104d424dc194bcd5e2591a35ab11579589ac81c 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -614,6 +614,19 @@ def telephone_field_tag(name, value = nil, options = {}) # # ==== Options # * Accepts the same options as text_field_tag. + # + # ==== Examples + # date_field_tag 'name' + # # => + # + # date_field_tag 'date', '01/01/2014' + # # => + # + # date_field_tag 'date', nil, class: 'special_input' + # # => + # + # date_field_tag 'date', '01/01/2014', class: 'special_input', disabled: true + # # => def date_field_tag(name, value = nil, options = {}) text_field_tag(name, value, options.stringify_keys.update("type" => "date")) end