aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_tag_helper.rb
diff options
context:
space:
mode:
authorOlek Janiszewski <olek.janiszewski@gmail.com>2012-02-12 13:32:53 +0100
committerOlek Janiszewski <olek.janiszewski@gmail.com>2012-02-12 16:23:43 +0100
commitd6b26a6040db97a55e23a7f10f2e9ba859eb11dc (patch)
tree490a06d52b15ce36c1d0e1686654fd2cb7f8c0e3 /actionpack/lib/action_view/helpers/form_tag_helper.rb
parent8671802fe8153e82e54b11c64537f5177f8670a3 (diff)
downloadrails-d6b26a6040db97a55e23a7f10f2e9ba859eb11dc.tar.gz
rails-d6b26a6040db97a55e23a7f10f2e9ba859eb11dc.tar.bz2
rails-d6b26a6040db97a55e23a7f10f2e9ba859eb11dc.zip
Add HTML5 input[type="date"] helper
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_tag_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb
index e97f602728..53fd189c39 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -549,6 +549,14 @@ module ActionView
end
alias phone_field_tag telephone_field_tag
+ # Creates a text field of type "date".
+ #
+ # ==== Options
+ # * Accepts the same options as text_field_tag.
+ def date_field_tag(name, value = nil, options = {})
+ text_field_tag(name, value, options.stringify_keys.update("type" => "date"))
+ end
+
# Creates a text field of type "url".
#
# ==== Options