Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed#10777
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
Closed
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
…lay seconds if needed
This was referencedMay 16, 2014
Contributor
Tobion commentedMay 16, 2014
👍 |
Member
fabpot commentedMay 16, 2014
Thank you@tucksaun. |
fabpot added a commit that referenced this pull requestMay 16, 2014
…ets to display seconds if needed (tucksaun)This PR was squashed before being merged into the 2.3 branch (closes#10777).Discussion----------[Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed| Q | A| ------------- | ---| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#9976,#10203| License | MIT| Doc PR | noneSame issue as#9976 and#10203: when you add a `time` field to a form with options `single_text` (so HTML5) and `with_seconds`, the generated input does not contain the `step` attribute, therefore the browser does not show them, leading to an error at the submit because of an invalid format.Compared to#9976/#10203:* Unit testable* Available directly in the component* Available in other templating format than twig* Still able to customise the step attribute by handCommits-------a379298 [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed
nicolas-grekas added a commit that referenced this pull requestApr 23, 2020
… (ottaviano)This PR was merged into the 3.4 branch.Discussion----------[Form] apply automatically step=1 for datetime-local input| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | yes| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets | ~| License | MIT| Doc PR |this PR just reapplies the same fix from `TimeType` (#10777 thanks@tucksaun) to `DateTimeType`.### before:```php'widget' => 'single_text','with_seconds' => true,```### after:```php'widget' => 'single_text','with_seconds' => true,```Commits-------3c24cfe [Form] apply automatically step=1 for datetime-local input
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same issue as#9976 and#10203: when you add a
timefield to a form with optionssingle_text(so HTML5) andwith_seconds, the generated input does not contain thestepattribute, therefore the browser does not show them, leading to an error at the submit because of an invalid format.Compared to#9976/#10203: