[TASK] Add documentation for DatePicker formats
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Documentation / Config / proto / formElements / formElementTypes / DatePicker / properties / dateFormat.rst
1 properties.dateFormat
2 ---------------------
3
4 :aspect:`Option path`
5 TYPO3.CMS.Form.prototypes.<prototypeIdentifier>.formElementsDefinition.DatePicker.properties.dateFormat
6
7 :aspect:`Data type`
8 string
9
10 :aspect:`Needed by`
11 Frontend/ Backend (form editor)
12
13 :aspect:`Overwritable within form definition`
14 Yes
15
16 :aspect:`form editor can write this property into the form definition (for prototype 'standard')`
17 Yes
18
19 :aspect:`Mandatory`
20 Yes
21
22 :aspect:`Default value (for prototype 'standard')`
23 .. code-block:: yaml
24 :linenos:
25 :emphasize-lines: 3
26
27 DatePicker:
28 properties:
29 containerClassAttribute: input
30 elementClassAttribute: 'small form-control'
31 elementErrorClassAttribute: error
32 timeSelectorClassAttribute: mini
33 timeSelectorHourLabel: ''
34 timeSelectorMinuteLabel: ''
35 dateFormat: Y-m-d
36 enableDatePicker: true
37 displayTimeSelector: false
38
39 .. :aspect:`Good to know`
40 ToDo
41
42 :aspect:`Description`
43 The datepicker time format.
44 The following date formats are allowed:
45
46 **Day**
47
48 ================ ==================================================================
49 Format character Description
50 ================ ==================================================================
51 d Day of the month, two digits with leading zeros
52 D A textual representation of a day, three letters
53 j Day of the month without leading zeros
54 l A full textual representation of the day of the week
55 ================ ==================================================================
56
57 **Month**
58
59 ================ ==================================================================
60 Format character Description
61 ================ ==================================================================
62 F A full textual representation of a month, such as January or March
63 m Numeric representation of a month, with leading zeros
64 M A short textual representation of a month, three letters
65 n Numeric representation of a month, without leading zeros
66 ================ ==================================================================
67
68 **Year**
69
70 ================ ==================================================================
71 Format character Description
72 ================ ==================================================================
73 Y A full numeric representation of a year, four digits
74 y A two digit representation of a year
75 ================ ==================================================================