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] Change datetime to datetime-local for HTML5 datetime input#24401

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
fabpot merged 1 commit intosymfony:2.7frompierredup:datetime-input
Mar 20, 2018

Conversation

@pierredup
Copy link
Contributor

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?Unknown
Deprecations?no
Tests pass?yes
Fixed tickets#24307
LicenseMIT
Doc PRN/A

Change the input type from datetime to datetime-local for HTML5 date input (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime)

pierrefeelunique reacted with thumbs up emoji
@nicolas-grekas
Copy link
Member

Is browser support good enough?
https://caniuse.com/#search=datetime-local

@nicolas-grekasnicolas-grekas added this to the2.7 milestoneOct 2, 2017
@ogizanagi
Copy link
Contributor

Anyway, isn't it a BC break? JS apps may rely ontype="datetime". Not sure it is worth it.

@stof
Copy link
Member

stof commentedOct 2, 2017

type="datetime" is supported by exactly 0 browser out there, meaning checking the type DOM property gives youtext due to the type fallback.
And thedatetime type is removed from the HTML spec.

However, the HTML5_FORMAT constant has the timezone included in the format. So it should be updated fordatetime-local to remove the timezone part.

dunglas, ogizanagi, ro0NL, and jvasseur reacted with thumbs up emoji

@xabbuh
Copy link
Member

Is this enough? I mean is the format in which data is sent by browsers the same as it was meant to with the olddatetime type?

@Tobion
Copy link
Contributor

From my short test, it seems Chrome submits thedatetime-local without a timezone. So@stof would be right that\Symfony\Component\Form\Extension\Core\Type\DateTimeType::HTML5_FORMAT needs to be changed.

Copy link
Contributor

@TobionTobion left a comment

Choose a reason for hiding this comment

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

html5 constant and description

@pierredup
Copy link
ContributorAuthor

Would it not be considered a BC break to change the value of a constant?

@simPod
Copy link
Contributor

What's the status of this? Can I help?

@nicolas-grekas
Copy link
Member

@pierredup let's do the change as requested by@Tobion /@stof

@pierreduppierredupforce-pushed thedatetime-input branch 2 times, most recently fromf2b7874 to31c9c1eCompareFebruary 7, 2018 07:39
@nicolas-grekas
Copy link
Member

@Tobion aren't we ready here?

@fabpot
Copy link
Member

Thank you@pierredup.

@fabpotfabpot merged commit802c67c intosymfony:2.7Mar 20, 2018
fabpot added a commit that referenced this pull requestMar 20, 2018
…e input (pierredup)This PR was merged into the 2.7 branch.Discussion----------[Form] Change datetime to datetime-local for HTML5 datetime input| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | Unknown| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#24307| License       | MIT| Doc PR        | N/AChange the input type from datetime to datetime-local for HTML5 date input (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime)Commits-------802c67c Change datetime input to datetime-local
This was referencedApr 2, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+1 more reviewer

@TobionTobionTobion approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

9 participants

@pierredup@nicolas-grekas@ogizanagi@stof@xabbuh@Tobion@simPod@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp