Skip to content
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

[Form] deprecate custom formats with HTML5 widgets #28723

Merged
merged 1 commit into from Feb 21, 2019

Conversation

Projects
None yet
5 participants
@xabbuh
Copy link
Member

commented Oct 4, 2018

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#10986

@xabbuh xabbuh added this to the next milestone Oct 4, 2018

@xabbuh xabbuh force-pushed the xabbuh:html5-singletext-format-deprecation branch 2 times, most recently from ecd04af to 055dc6c Oct 5, 2018

@nicolas-grekas
Copy link
Member

left a comment

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.

@xabbuh xabbuh force-pushed the xabbuh:html5-singletext-format-deprecation branch 2 times, most recently from 7b388e6 to f973630 Oct 8, 2018

@xabbuh xabbuh force-pushed the xabbuh:html5-singletext-format-deprecation branch 2 times, most recently from e547eb7 to 7ffad2b Oct 16, 2018

@xabbuh

This comment has been minimized.

Copy link
Member Author

commented Oct 19, 2018

The thing is that custom formats do not work with type="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. setting html5 to false). The rendering will then use a type="text" input which will behave as expected with custom formats.

@yceruto yceruto referenced this pull request Oct 19, 2018

Merged

Fix DateTimePicker widget #877

javiereguiluz added a commit to symfony/demo that referenced this pull request Oct 19, 2018

bug #877 Fix DateTimePicker widget (yceruto)
This PR was merged into the master branch.

Discussion
----------

Fix DateTimePicker widget

As spotted here symfony/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
Show resolved Hide resolved UPGRADE-4.2.md Outdated
@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Oct 20, 2018

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

makes sense!

@xabbuh xabbuh force-pushed the xabbuh:html5-singletext-format-deprecation branch 2 times, most recently from 80a13ad to 3971ecd Oct 22, 2018

@xabbuh xabbuh force-pushed the xabbuh:html5-singletext-format-deprecation branch 2 times, most recently from b6ccdd6 to bfe80ac Nov 16, 2018

@xabbuh xabbuh force-pushed the xabbuh:html5-singletext-format-deprecation branch from bfe80ac to ebb2d7c Nov 20, 2018

@xabbuh xabbuh force-pushed the xabbuh:html5-singletext-format-deprecation branch 2 times, most recently from 804a04d to ea3143e Jan 2, 2019

@xabbuh xabbuh force-pushed the xabbuh:html5-singletext-format-deprecation branch from ea3143e to 01f65f4 Jan 16, 2019

@xabbuh xabbuh force-pushed the xabbuh:html5-singletext-format-deprecation branch from 01f65f4 to 0823d38 Jan 27, 2019

@xabbuh xabbuh force-pushed the xabbuh:html5-singletext-format-deprecation branch from 0823d38 to c07d638 Feb 21, 2019

@xabbuh xabbuh force-pushed the xabbuh:html5-singletext-format-deprecation branch from c07d638 to b70c1b6 Feb 21, 2019

@xabbuh xabbuh merged commit b70c1b6 into symfony:master Feb 21, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

xabbuh added a commit that referenced this pull request Feb 21, 2019

feature #28723 [Form] deprecate custom formats with HTML5 widgets (xa…
…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#10986

Commits
-------

b70c1b6 deprecate custom formats with HTML5 widgets

@xabbuh xabbuh deleted the xabbuh:html5-singletext-format-deprecation branch Feb 21, 2019

javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Mar 7, 2019

minor #10986 format option deprecation for HTML 5 widgets (xabbuh)
This PR was merged into the master branch.

Discussion
----------

format option deprecation for HTML 5 widgets

document the deprecations that will be introduced with symfony/symfony#28723

Commits
-------

f4597bf format option deprecation for HTML 5 widgets

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019

@fabpot fabpot referenced this pull request May 9, 2019

Merged

Release v4.3.0-BETA1 #31435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.