I want to have year list in date field to be in descending order. I could not find option in Symfony reference http://symfony.com/doc/current/reference/forms/types/date.html .
I have a feeling that this is not possible by only switching an option, but maybe I just did not found it?
If not possible - how it can be implemented differently? Extend data class or something?
So the trick was to set range
option using higher date value first. I set 'years' => range(date('Y') - 14, date('Y') - 60),
.
'years' => range(date('Y') -13, date('Y') -100),
// for 13 to 100 years old people
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments