symfony/symfony — pull request #6217 by bschussek (2012-12-06 19:02:49+00:00)
Title: [Form] Fixed the "format" option in DateType

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6141
Todo: -
License of the code: MIT
Documentation PR: -

This PR fixes a regression introduced in #4839. To quote that PR:

> This PR changes DateType and DateTimeType to support HTML5 by default when setting the option "widget" to "single_text".

In reality, the "format" option now defaults to the HTML5 format always, not just when "widget" is "single_text". This is fixed here.

The second commit in this PR removes special characters between select/text fields. What, with German locale, was

```
..
```

before is now

```

```

This is the way date fields are represented on the majority of websites. If you *need* separators, you can have them by setting the "format" option to a custom value:

```php
$builder->add('myDate', 'date', array(
'format' => 'dd.MM.yyyy',
));
```