Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
[Form] Update datetime.rst - Date label and time label are not guessed.#21147
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 ourterms of service andprivacy 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
Date label and time label are not guessed.
The thing is what you linked to is only what happens inside the form type. But later on when the form is rendered the described guessing is happening inside the form theme:https://github.com/symfony/symfony/blob/62ecae9ab5225a0f3374e89ac276ebb3d22eb8f5/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig#L304-L313 |
Hmmm… I wasn't seeing that using the div_layout theme. I'll check I wasn't overriding anything. |
@xabbuh I don't think the date time widget renders the Default theme, no css: Theme html: |
Date label and time label are not guessed. They are set if a value is not
null
https://github.com/symfony/symfony/blob/7.4/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php#L155-L161
The default values are also null:
https://github.com/symfony/symfony/blob/7.4/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php#L270-L271