Skip to content

Commit ffe2d21

Browse files
javiereguiluzxabbuh
authored andcommitted
Documented the "labels" option of DateIntervalType
1 parent c45a7f2 commit ffe2d21

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

reference/forms/types/dateinterval.rst

+23
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ or an array (see `input`_).
2727
| | - `seconds`_ |
2828
| | - `weeks`_ |
2929
| | - `input`_ |
30+
| | - `labels`_ |
3031
| | - `placeholder`_ |
3132
| | - `widget`_ |
3233
| | - `with_days`_ |
@@ -128,6 +129,28 @@ your underlying object. Valid values are:
128129
The value that comes back from the form will also be normalized back into
129130
this format.
130131

132+
labels
133+
~~~~~~
134+
135+
.. versionadded:: 3.3
136+
The ``labels`` option was introduced in Symfony 3.3.
137+
138+
**type**: ``array`` **default**: (see below)
139+
140+
The labels displayed for each of the elements of this type. The default values
141+
are ``null``, so they display the "humanized version" of the child names (``Invert``,
142+
``Years``, etc.)::
143+
144+
'labels' => array(
145+
'invert' => null,
146+
'years' => null,
147+
'months' => null,
148+
'days' => null,
149+
'hours' => null,
150+
'minutes' => null,
151+
'seconds' => null,
152+
)
153+
131154
minutes
132155
~~~~~~~
133156

0 commit comments

Comments
 (0)