83
83
List of days available to the days field type. This option is only relevant
84
84
when the ``widget `` option is set to ``choice ``::
85
85
86
- 'days' => range(1, 31)
86
+ // values displayed to users range from 0 to 30 (both inclusive)
87
+ 'days' => range(1, 31),
88
+
89
+ // values displayed to users range from 1 to 31 (both inclusive)
90
+ 'days' => array_combine(range(1, 31), range(1, 31)),
87
91
88
92
placeholder
89
93
~~~~~~~~~~~
@@ -112,7 +116,11 @@ hours
112
116
List of hours available to the hours field type. This option is only relevant
113
117
when the ``widget `` option is set to ``choice ``::
114
118
115
- 'hours' => range(1, 24)
119
+ // values displayed to users range from 0 to 23 (both inclusive)
120
+ 'hours' => range(1, 24),
121
+
122
+ // values displayed to users range from 1 to 24 (both inclusive)
123
+ 'hours' => array_combine(range(1, 24), range(1, 24)),
116
124
117
125
input
118
126
~~~~~
@@ -161,7 +169,11 @@ minutes
161
169
List of minutes available to the minutes field type. This option is only relevant
162
170
when the ``widget `` option is set to ``choice ``::
163
171
164
- 'minutes' => range(1, 60)
172
+ // values displayed to users range from 0 to 59 (both inclusive)
173
+ 'minutes' => range(1, 60),
174
+
175
+ // values displayed to users range from 1 to 60 (both inclusive)
176
+ 'minutes' => array_combine(range(1, 60), range(1, 60)),
165
177
166
178
months
167
179
~~~~~~
@@ -171,7 +183,11 @@ months
171
183
List of months available to the months field type. This option is only relevant
172
184
when the ``widget `` option is set to ``choice ``::
173
185
174
- 'months' => range(1, 12)
186
+ // values displayed to users range from 0 to 11 (both inclusive)
187
+ 'months' => range(1, 12),
188
+
189
+ // values displayed to users range from 1 to 12 (both inclusive)
190
+ 'months' => array_combine(range(1, 12), range(1, 12)),
175
191
176
192
seconds
177
193
~~~~~~~
@@ -181,7 +197,11 @@ seconds
181
197
List of seconds available to the seconds field type. This option is only relevant
182
198
when the ``widget `` option is set to ``choice ``::
183
199
184
- 'seconds' => range(1, 60)
200
+ // values displayed to users range from 0 to 59 (both inclusive)
201
+ 'seconds' => range(1, 60),
202
+
203
+ // values displayed to users range from 1 to 60 (both inclusive)
204
+ 'seconds' => array_combine(range(1, 60), range(1, 60)),
185
205
186
206
weeks
187
207
~~~~~
@@ -191,7 +211,11 @@ weeks
191
211
List of weeks available to the weeks field type. This option is only relevant
192
212
when the ``widget `` option is set to ``choice ``::
193
213
194
- 'weeks' => range(1, 52)
214
+ // values displayed to users range from 0 to 51 (both inclusive)
215
+ 'weeks' => range(1, 52),
216
+
217
+ // values displayed to users range from 1 to 52 (both inclusive)
218
+ 'weeks' => array_combine(range(1, 52), range(1, 52)),
195
219
196
220
widget
197
221
~~~~~~
@@ -304,7 +328,11 @@ years
304
328
List of years available to the years field type. This option is only relevant
305
329
when the ``widget `` option is set to ``choice ``::
306
330
307
- 'years' => range(1, 100)
331
+ // values displayed to users range from 0 to 99 (both inclusive)
332
+ 'years' => range(1, 100),
333
+
334
+ // values displayed to users range from 1 to 100 (both inclusive)
335
+ 'years' => array_combine(range(1, 100), range(1, 100)),
308
336
309
337
Inherited Options
310
338
-----------------
0 commit comments