Skip to content

[Form] Add input=date_point to DateTimeType, DateType and TimeType #21027

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

Merged
merged 1 commit into from
Jun 2, 2025

Conversation

wkania
Copy link
Contributor

@wkania wkania commented Jun 1, 2025

Fix #21022

use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\Extension\Core\Type\TimeType;
use Symfony\Component\Form\Extension\Core\Type\BirthdayType;

$builder->add('from', DateType::class, [
    'input' => 'date_point',
]);
$builder->add('from', DateTimeType::class, [
    'input' => 'date_point',
]);
$builder->add('from', TimeType::class, [
    'input' => 'date_point',
]);
$builder->add('from', BirthdayType::class, [
    'input' => 'date_point',
]);

@wkania wkania requested a review from xabbuh as a code owner June 1, 2025 05:19
@carsonbot carsonbot added this to the 7.4 milestone Jun 1, 2025
@javiereguiluz javiereguiluz merged commit da5762a into symfony:7.4 Jun 2, 2025
5 of 6 checks passed
@javiereguiluz
Copy link
Member

Thanks @wkania. The first merge in 7.4 branch 🥳

While merging I did some tweaks to add a link to DatePoint docs (because this is not standard in PHP and would be confusing for some folks) and I also added the missing versionadded. See 2276ec1

@wkania
Copy link
Contributor Author

wkania commented Jun 2, 2025

@javiereguiluz For some reason, I assumed that versionadded didn’t need to be included for LTS versions, since it would be removed in the next release anyway. Probably another project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants