Unable to change the year range on a "Date" dropdown auto-generated
jaznow opened this issue · comments
Jaznow commented
I've been unable to find the way of changing the year range, by default its 5 years before today, and 5 years after today.
I sould be able to change the years displayed on a autogenerated dropdown menu for "date" datatype.
Jordi Llonch commented
We are using "plain Symfony2 forms". Just edit your form type class generated by the bundle and add something like:
->add('myDateField', 'date', array(
'years' => range(Date('Y') - 20, date('Y'))
))