Skip to content

Commit d9697d4

Browse files
committed
[Form] Add input_format option to TimeType
1 parent b314c31 commit d9697d4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

reference/forms/types/time.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ stored as a ``DateTime`` object, a string, a timestamp or an array.
2020
| | - `hours`_ |
2121
| | - `html5`_ |
2222
| | - `input`_ |
23+
| | - `input_format`_ |
2324
| | - `minutes`_ |
2425
| | - `model_timezone`_ |
2526
| | - `seconds`_ |
@@ -129,6 +130,16 @@ on your underlying object. Valid values are:
129130
The value that comes back from the form will also be normalized back into
130131
this format.
131132

133+
input_format
134+
~~~~~~~~~~~~
135+
136+
**type**: ``string`` **default**: ``H:i:s``
137+
138+
If the ``input`` option is set to ``string``, this option specifies the format
139+
of the time. This must be a valid `PHP time format`_.
140+
141+
.. _`PHP time format`: https://secure.php.net/manual/en/function.date.php
142+
132143
.. include:: /reference/forms/types/options/minutes.rst.inc
133144

134145
.. include:: /reference/forms/types/options/model_timezone.rst.inc

0 commit comments

Comments
 (0)