-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Add input=date_point
to DateTimeType
, DateType
and TimeType
#60315
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
base: 7.3
Are you sure you want to change the base?
Conversation
input=date_point
to DateTimeType, DateType and TimeType
The approach makes sense to me. |
src/Symfony/Component/Form/Extension/Core/DataTransformer/DatePointToDateTimeTransformer.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Form/Extension/Core/DataTransformer/DatePointToDateTimeTransformer.php
Outdated
Show resolved
Hide resolved
cb58650
to
521e9cf
Compare
I have added DateTimeType and TimeType. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
input=date_point
to DateTimeType, DateType and TimeTypeinput=date_point
to DateTimeType
, DateType
and TimeType
@@ -6,6 +6,7 @@ CHANGELOG | |||
|
|||
* Add support for displaying nested options in DebugCommand | |||
* Add support for strings as data for the `MoneyType` | |||
* Add `input=date_point` to DateTimeType, DateType and TimeType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Add `input=date_point` to DateTimeType, DateType and TimeType | |
* Add `input=date_point` to `DateTimeType`, `DateType` and `TimeType` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After Oskar's comment
Based on datetime_immutable.
After DatePointType and DatePointDateType, it would be great to use Forms without needing to transform values into the DatePoint type manually.
Alternative: Make symfony/clock a hard requirement and refactor the existing DateTimeImmutableToDateTimeTransformer to return a DatePoint instead. This should not introduce any breaking changes.