aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/CHANGELOG.md')
-rw-r--r--actionview/CHANGELOG.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md
index a1901e8a17..b023e79b66 100644
--- a/actionview/CHANGELOG.md
+++ b/actionview/CHANGELOG.md
@@ -1,3 +1,19 @@
+* `date_select` helper `:with_css_classes` option now accepts a hash of strings
+ for `:year`, `:month`, `:day`, `:hour`, `:minute`, `:second` that will extend
+ the select type with the given css class value.
+
+ ```erb
+ <%= f.date_select :birthday, with_css_classes: { month: "my-month", year: "my-year" } %>
+ ```
+
+ ```html
+ <select id="user_birthday_3i" name="user[birthday(3i)]">…</select>
+ <select id="user_birthday_2i" name="user[birthday(2i)]" class="my-month">…</select>
+ <select id="user_birthday_1i" name="user[birthday(1i)]" class="my-year">…</select>
+ ```
+
+ *Matthias Neumayr*
+
* Deprecate `datetime_field` and `datetime_field_tag` helpers.
Datetime input type was removed from HTML specification.
One can use `datetime_local_field` and `datetime_local_field_tag` instead.