Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcfec9d6

Browse files
committed
[Form] Add input_format option to TimeType
1 parentb314c31 commitcfec9d6

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

‎reference/forms/types/options/date_input_format_description.rst.inc‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. versionadded:: 4.3
2+
3+
The ``input_format`` option was introduced in Symfony 4.3.
4+
15
If the ``input`` option is set to ``string``, this option specifies the format
26
of the date. This must be a valid `PHP date format`_.
37

‎reference/forms/types/time.rst‎

Lines changed: 15 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,18 @@ 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+
..versionadded::4.3
139+
140+
The ``input_format`` option was introduced in Symfony 4.3.
141+
142+
If the ``input`` option is set to ``string``, this option specifies the format
143+
of the time. This must be a valid `PHP time format`_.
144+
132145
..include::/reference/forms/types/options/minutes.rst.inc
133146

134147
..include::/reference/forms/types/options/model_timezone.rst.inc
@@ -222,3 +235,5 @@ Form Variables
222235
| type| ``string``| Only present when widget is ``single_text`` and HTML5 is activated,|
223236
||| contains the input type to use (``datetime``, ``date`` or ``time``).|
224237
+--------------+-------------+----------------------------------------------------------------------+
238+
239+
.. _`PHP time format`:https://secure.php.net/manual/en/function.date.php

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp