Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Form] deprecate custom formats with HTML5 widgets#28723

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

Merged

Conversation

@xabbuh
Copy link
Member

@xabbuhxabbuh commentedOct 4, 2018
edited
Loading

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PRsymfony/symfony-docs#10986

jvasseur reacted with thumbs up emoji
@xabbuhxabbuh added this to thenext milestoneOct 4, 2018
@xabbuhxabbuhforce-pushed thehtml5-singletext-format-deprecation branch 2 times, most recently fromecd04af to055dc6cCompareOctober 5, 2018 07:45
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Why would it make Symfony better? I mean, yes, html5 is a standard, but why should we stricter than required actually? What's the benefit? I don't feel like this would make anything easier to maintain, nor easier to work with.

@xabbuhxabbuhforce-pushed thehtml5-singletext-format-deprecation branch 2 times, most recently from7b388e6 tof973630CompareOctober 8, 2018 19:54
@xabbuhxabbuhforce-pushed thehtml5-singletext-format-deprecation branch 2 times, most recently frome547eb7 to7ffad2bCompareOctober 19, 2018 08:05
@xabbuh
Copy link
MemberAuthor

The thing is that custom formats do not work withtype="datetime-local input fields. If you use a JavaScript-based widget you will hide this fact, but as soon as your application falls back to the HTML input for whatever reason, the input will not behave as expected. Using a custom format is totally fine, but in this case you need to opt-out of the HTML5 datetime input (i.e. settinghtml5 tofalse). The rendering will then use atype="text" input which will behave as expected with custom formats.

yceruto and jvasseur reacted with thumbs up emoji

javiereguiluz added a commit to symfony/demo that referenced this pull requestOct 19, 2018
This PR was merged into the master branch.Discussion----------Fix DateTimePicker widgetAs spotted heresymfony/symfony#28723 (comment) we need to disable `html5` to use a `type="text"` input and make it work again.| before | after || --- | --- || ![wrong_datepicker](https://user-images.githubusercontent.com/2028198/47217570-d05a9880-d376-11e8-9e3a-116769569f22.png) | ![correct_datepicker](https://user-images.githubusercontent.com/2028198/47217582-d6e91000-d376-11e8-9fb7-86384c57ebbb.png) |Commits-------a556025 Fix DateTimePicker widget
@nicolas-grekas
Copy link
Member

custom formats do not work with type="datetime-local input fields

makes sense!

@xabbuhxabbuhforce-pushed thehtml5-singletext-format-deprecation branch 2 times, most recently from80a13ad to3971ecdCompareOctober 22, 2018 08:01
@xabbuhxabbuhforce-pushed thehtml5-singletext-format-deprecation branch 2 times, most recently fromb6ccdd6 tobfe80acCompareNovember 20, 2018 08:14
@xabbuhxabbuhforce-pushed thehtml5-singletext-format-deprecation branch frombfe80ac toebb2d7cCompareNovember 20, 2018 09:57
@xabbuhxabbuhforce-pushed thehtml5-singletext-format-deprecation branch 2 times, most recently from804a04d toea3143eCompareJanuary 5, 2019 16:58
@xabbuhxabbuhforce-pushed thehtml5-singletext-format-deprecation branch fromea3143e to01f65f4CompareJanuary 16, 2019 23:05
@xabbuhxabbuhforce-pushed thehtml5-singletext-format-deprecation branch fromc07d638 tob70c1b6CompareFebruary 21, 2019 07:52
@xabbuhxabbuh merged commitb70c1b6 intosymfony:masterFeb 21, 2019
xabbuh added a commit that referenced this pull requestFeb 21, 2019
…bbuh)This PR was merged into the 4.3-dev branch.Discussion----------[Form] deprecate custom formats with HTML5 widgets| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |symfony/symfony-docs#10986Commits-------b70c1b6 deprecate custom formats with HTML5 widgets
@xabbuhxabbuh deleted the html5-singletext-format-deprecation branchFebruary 21, 2019 09:42
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestMar 7, 2019
This PR was merged into the master branch.Discussion----------format option deprecation for HTML 5 widgetsdocument the deprecations that will be introduced withsymfony/symfony#28723Commits-------f4597bf format option deprecation for HTML 5 widgets
@nicolas-grekasnicolas-grekas modified the milestones:next,4.3Apr 30, 2019
@fabpotfabpot mentioned this pull requestMay 9, 2019
sayjun0505 added a commit to sayjun0505/sym_proj that referenced this pull requestApr 16, 2023
This PR was merged into the master branch.Discussion----------Fix DateTimePicker widgetAs spotted heresymfony/symfony#28723 (comment) we need to disable `html5` to use a `type="text"` input and make it work again.| before | after || --- | --- || ![wrong_datepicker](https://user-images.githubusercontent.com/2028198/47217570-d05a9880-d376-11e8-9e3a-116769569f22.png) | ![correct_datepicker](https://user-images.githubusercontent.com/2028198/47217582-d6e91000-d376-11e8-9fb7-86384c57ebbb.png) |Commits-------a556025 Fix DateTimePicker widget
spider-yamet added a commit to spider-yamet/sym_proj that referenced this pull requestApr 16, 2023
This PR was merged into the master branch.Discussion----------Fix DateTimePicker widgetAs spotted heresymfony/symfony#28723 (comment) we need to disable `html5` to use a `type="text"` input and make it work again.| before | after || --- | --- || ![wrong_datepicker](https://user-images.githubusercontent.com/2028198/47217570-d05a9880-d376-11e8-9e3a-116769569f22.png) | ![correct_datepicker](https://user-images.githubusercontent.com/2028198/47217582-d6e91000-d376-11e8-9fb7-86384c57ebbb.png) |Commits-------a556025 Fix DateTimePicker widget
frederickboyd pushed a commit to frederickboyd/frederickboyd that referenced this pull requestMay 25, 2025
This PR was merged into the master branch.Discussion----------Fix DateTimePicker widgetAs spotted heresymfony/symfony#28723 (comment) we need to disable `html5` to use a `type="text"` input and make it work again.| before | after || --- | --- || ![wrong_datepicker](https://user-images.githubusercontent.com/2028198/47217570-d05a9880-d376-11e8-9e3a-116769569f22.png) | ![correct_datepicker](https://user-images.githubusercontent.com/2028198/47217582-d6e91000-d376-11e8-9fb7-86384c57ebbb.png) |Commits-------a556025 Fix DateTimePicker widget
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ycerutoycerutoyceruto left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+1 more reviewer

@ro0NLro0NLro0NL left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

5 participants

@xabbuh@nicolas-grekas@ro0NL@yceruto@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp