8484List of days available to the days field type. This option is only relevant
8585when the ``widget `` option is set to ``choice ``::
8686
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)),
8892
8993placeholder
9094~~~~~~~~~~~
@@ -113,7 +117,11 @@ hours
113117List of hours available to the hours field type. This option is only relevant
114118when the ``widget `` option is set to ``choice ``::
115119
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)),
117125
118126input
119127~~~~~
@@ -158,7 +166,11 @@ minutes
158166List of minutes available to the minutes field type. This option is only relevant
159167when the ``widget `` option is set to ``choice ``::
160168
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)),
162174
163175months
164176~~~~~~
@@ -168,7 +180,11 @@ months
168180List of months available to the months field type. This option is only relevant
169181when the ``widget `` option is set to ``choice ``::
170182
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)),
172188
173189seconds
174190~~~~~~~
@@ -178,7 +194,11 @@ seconds
178194List of seconds available to the seconds field type. This option is only relevant
179195when the ``widget `` option is set to ``choice ``::
180196
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)),
182202
183203weeks
184204~~~~~
@@ -188,7 +208,11 @@ weeks
188208List of weeks available to the weeks field type. This option is only relevant
189209when the ``widget `` option is set to ``choice ``::
190210
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)),
192216
193217widget
194218~~~~~~
@@ -301,7 +325,11 @@ years
301325List of years available to the years field type. This option is only relevant
302326when the ``widget `` option is set to ``choice ``::
303327
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)),
305333
306334Inherited Options
307335-----------------
0 commit comments