sonata-project / SonataCoreBundle

[deprecated] SonataCoreBundle
MIT License
319 stars 139 forks source link

Sets by default the long date format on the date picker form type #709

Closed DavidHernandez closed 3 years ago

DavidHernandez commented 5 years ago

Subject

Sets by default the long date format to allow forms in Spanish to submit dates without extra configuration.

Branch

I'm targeting this branch because it fixes a small issue that affects only sites with a Spanish locale and using the DatePicker form type when using the default or medium DateType Format. This change will not break any existing site but it will change the format used in the form fields that are not directly changed to use a different format.

Issue

The issue being resolved was originally reported on the SonataAdminBundle: https://github.com/sonata-project/SonataAdminBundle/issues/5235

Changelog

Changed

OskarStark commented 5 years ago

Can you please share a before/after screenshot?

core23 commented 5 years ago

After merging this, please open an other PR here: https://github.com/sonata-project/form-extensions

The CoreBundle is deprecated

DavidHernandez commented 5 years ago

The before Medium format:

Screenshot from 2019-08-08 09-44-54

It causes an error on save: Screenshot from 2019-08-08 09-45-06

After changing the format:

Screenshot from 2019-08-08 09-45-45

It works properly: Screenshot from 2019-08-08 09-46-35

core23 commented 5 years ago

Does this affect the English date format?

OskarStark commented 5 years ago

I would say yes

core23 commented 5 years ago

Did the format change for the English locale?

jordisala1991 commented 3 years ago

This change should be applied on form-extension package