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