step,range,limits for timepicker

This commit is contained in:
Tchama 2019-01-24 15:48:28 +01:00
parent 3b734da150
commit b296107de4

View File

@ -27,7 +27,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
* Extends the symfony `Symfony\Component\Form\Extension\Core\Type\DateType`
* to automatically create a date picker.
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
* @author Mathieu Jaumotte <jaum_mathieu@collectifs.net>
*/
class ChillDateTimeType extends AbstractType
{
@ -37,6 +37,8 @@ class ChillDateTimeType extends AbstractType
->setDefault('date_widget', 'single_text')
->setDefault('date_format', 'dd-MM-yyyy')
->setDefault('time_widget', 'choice')
->setDefault('minutes', range(0, 59, 5))
->setDefault('hours', range(8, 22))
->setDefault('html5', true)
;
}