-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form][Date(Time)Type] Use a custom string date format #29883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The data transformer already supports this setting. Exposing it in the form type for people using the |
Adding a new option like |
symfony-splitter
pushed a commit
to symfony/form
that referenced
this issue
Feb 20, 2019
…eType (fancyweb) This PR was merged into the 4.3-dev branch. Discussion ---------- [Form] Add input_format option to DateType and DateTimeType | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#29883 | License | MIT | Doc PR | symfony/symfony-docs#10882 Add a new option to specify the date format when using the `string` input type. Commits ------- c8240a0423 [Form] Add input_format option to DateType and DateTimeType
xabbuh
added a commit
that referenced
this issue
Feb 20, 2019
…eType (fancyweb) This PR was merged into the 4.3-dev branch. Discussion ---------- [Form] Add input_format option to DateType and DateTimeType | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #29883 | License | MIT | Doc PR | symfony/symfony-docs#10882 Add a new option to specify the date format when using the `string` input type. Commits ------- c8240a0 [Form] Add input_format option to DateType and DateTimeType
implemented in #29887 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently there is no way to use a custom string date format (cf
symfony/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php
Line 179 in 508602d
This is a problem if you already have data in another format than the default one. It becomes impossible to use these form types without a data migration.
Should we add a "string_format" option ? @xabbuh
The text was updated successfully, but these errors were encountered: