Skip to content

Commit ed241ab

Browse files
committed
feature #4487 Documented html5 option (WouterJ)
This PR was merged into the 2.6 branch. Discussion ---------- Documented html5 option | Q | A | --- | --- | Doc fix? | no | New docs? | yes (symfony/symfony#8291, symfony/symfony#11994) | Applies to | 2.6+ | Fixed tickets | #4262 Commits ------- d08925e Yet another typo fix 238beef Typo fix 22069f4 Documented html5 option
2 parents 48a5af3 + d08925e commit ed241ab

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

reference/forms/types/date.rst

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ day, and year) or three select boxes (see the `widget`_ option).
2222
| Options | - `days`_ |
2323
| | - `placeholder`_ |
2424
| | - `format`_ |
25+
| | - `html5`_ |
2526
| | - `input`_ |
2627
| | - `model_timezone`_ |
2728
| | - `months`_ |
@@ -109,6 +110,8 @@ Alternatively, you can specify a string to be displayed for the "blank" value::
109110

110111
.. include:: /reference/forms/types/options/date_format.rst.inc
111112

113+
.. include:: /reference/forms/types/options/html5.rst.inc
114+
112115
.. _form-reference-date-input:
113116

114117
.. include:: /reference/forms/types/options/date_input.rst.inc

reference/forms/types/datetime.rst

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ data can be a ``DateTime`` object, a string, a timestamp or an array.
2121
| | - `placeholder`_ |
2222
| | - `format`_ |
2323
| | - `hours`_ |
24+
| | - `html5`_ |
2425
| | - `input`_ |
2526
| | - `minutes`_ |
2627
| | - `model_timezone`_ |
@@ -82,6 +83,8 @@ field to be rendered as an ``input`` field with ``type="datetime"``.
8283

8384
.. include:: /reference/forms/types/options/hours.rst.inc
8485

86+
.. include:: /reference/forms/types/options/html5.rst.inc
87+
8588
input
8689
~~~~~
8790

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
html5
2+
~~~~~
3+
4+
.. versionadded:: 2.6
5+
The ``html5`` option was introduced in Symfony 2.6.
6+
7+
**type**: ``boolean`` **default**: ``true``
8+
9+
If this is set to ``true`` (the default), it'll use the HTML5 type (date, time
10+
or datetime) to render the field. When set to ``false``, it'll use the text type.
11+
12+
This is useful when you want to use a custom JavaScript datapicker, which
13+
often requires a text type instead of an HTML5 type.

reference/forms/types/time.rst

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ as a ``DateTime`` object, a string, a timestamp or an array.
1717
+----------------------+-----------------------------------------------------------------------------+
1818
| Options | - `placeholder`_ |
1919
| | - `hours`_ |
20+
| | - `html5`_ |
2021
| | - `input`_ |
2122
| | - `minutes`_ |
2223
| | - `model_timezone`_ |
@@ -81,6 +82,8 @@ Field Options
8182

8283
.. include:: /reference/forms/types/options/hours.rst.inc
8384

85+
.. include:: /reference/forms/types/options/html5.rst.inc
86+
8487
input
8588
~~~~~
8689

0 commit comments

Comments
 (0)