I have a Symfony2 application which receive a JSON data in a form. One of the field is a date time. If I renderize the field form in this way:
->add('startDate', 'date', array(
'widget' => 'single_text',
'format' => 'yyyy-MM-dd HH:mm:ss'))
This accept something like:
"startDate": "2015-05-03 12:30:00"
But I need to introduce a datetime in this way:
"startDate": "2015-05-12T15:43:00+0200"
How can I set this format in the field?