Reputation: 381
i have a problem with a widget date in a Symfony form, i have this code
->add('borndate', 'birthday', array(
'widget' => 'choice',
'attr' => array(
'class' => 'form-control'
),
'label' => 'user.birthday.label',
'input' => 'string',
'format' => 'yyyy.MM.dd',
'empty_value' => array('year' => 'user.birthday.year', 'month' => 'user.birthday.month', 'day' => 'user.birthday.day'),
'data' => '1950-01-01'
))
Now i have this type of format in my form: 1950 - 01 - 01 but i would this format 01 - 01- 1950 and print in a select the value of my db? How can i do for solved this two problems?? Thanks and sorry for my bad english :)
Upvotes: 1
Views: 217