File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
reference/forms/types/options Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 5
5
6
6
Option passed to the ``IntlDateFormatter`` class , used to transform user input
7
7
into the proper format. This is critical when the `widget`_ option is
8
- set to ``single_text``, and will define how to transform the input. By default,
9
- the format is determined based on the current user locale; you can override
10
- it by passing the format as a string.
8
+ set to ``single_text``, and will define how the user will input the data.
9
+ By default, the format is determined based on the current user locale; you
10
+ can override it by passing the format as a string.
11
+
12
+ For more information on valid formats, see `Date/Time Format Syntax`_. For
13
+ example, to render a single text box that expects the user to end ``YYYY-MM-dd``,
14
+ use the following options::
15
+
16
+ $builder->add(' date_created' , ' date' , array (
17
+ ' widget' => ' single_text' ,
18
+ ' format' => ' YYYY-MM-dd' ,
19
+ ));
20
+
21
+ .. _`Date/Time Format Syntax`: http:// userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax
You can’t perform that action at this time.
0 commit comments