symfony/symfony — pull request #4839 by bschussek (2012-07-10 15:27:30+00:00)
Title: [Form] Changed DateType to support HTML5 by default

Bug fix: no
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #3162
Todo: -

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

I was also trying to change DateTimeType in the same way, but failed, because ICU cannot generate RFC 3339 dates (which are expected by HTML5). Instead, the default format of DateTimeType (when "widget" is "single_text") is now set to the RFC 3339 date but without appended timezone, i.e.

```
2012-07-10T17:26:14
```

instead of

```
2012-07-10T17:26:14+02:00
2012-07-10T17:26:14Z
```

Also, the option "format" was added to DateTimeType.