8000 Documented html5 option · symfony/symfony-docs@22069f4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 22069f4

Browse files
committed
Documented html5 option
1 parent ad4c1f0 commit 22069f4

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

reference/forms/types/date.rst

Lines changed: 3 additions & 0 deletions
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
| | - `empty_value`_ |
2424
| | - `format`_ |
25+
| | - `html5`_ |
2526
| | - `input`_ |
2627
| | - `model_timezone`_ |
2728
| | - `months`_ |
@@ -105,6 +106,8 @@ Alternatively, you can specify a string to be displayed for the "blank" value::
105106

106107
.. include:: /reference/forms/types/options/date_format.rst.inc
107108

109+
.. include:: /reference/forms/types/options/html5.rst.inc
110+
108111
.. _form-reference-date-input:
109112

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

reference/forms/types/datetime.rst

Lines changed: 3 additions & 0 deletions
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
| | - `empty_value`_ |
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

Lines changed: 13 additions & 0 deletions
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 usefull when you want to use a custom JavaScript datapicker, which
13+
often require a text type instead of a HTML5 type.

reference/forms/types/time.rst

Lines changed: 3 additions & 0 deletions
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 | - `empty_value`_ |
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)
0