-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[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
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
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
|
Updated Changelog 7.3 ->7.4. |
src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
Outdated
Show resolved
Hide resolved
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.
Good to me once this minor comment + @xabbuh's have been addressed
4012e83 to
f1160d6
Compare
|
Thank you @wkania. |
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 DateTimeImmutableToDateTimeTransfor 8000 mer to return a DatePoint instead. This should not introduce any breaking changes.