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

Fix 'step', 'min' & 'max' controls on date/time inputs#2119

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

Open
ElGigi wants to merge3 commits intojquery-validation:master
base:master
Choose a base branch
Loading
fromElGigi:patch-1

Conversation

ElGigi
Copy link

@ElGigiElGigi commentedDec 14, 2017
edited
Loading

Checklist for this pull request

Before submitting a pull request, please make sure to follow these rules:

  • Your code should contain tests relevant for the problem you are solving.
  • Your commits messages format should follow the jQuery git commit message format (http://contribute.jquery.org/commits-and-pull-requests/#commit-guidelines).
  • The pull request should reference existing issues or link to a reproducible demo.
  • Please review the guidelines for contributing (CONTRIBUTING.md) to this repository for more information.

Description

In reference to issue:#2023

It's a solution for jquery-validation to support attributes: 'step', 'min' and 'max' on inputs of type : 'time', 'date', 'datetime', 'datetime-local', 'month' and 'week'.

It respond to:

// TODO find a way to support input types date, datetime, datetime-local, month, time and week

Specifications:https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type%3Ddatetime-local)

tsu1980 reacted with thumbs up emoji
@staabm
Copy link
Member

staabm commentedDec 14, 2017
edited
Loading

A good first step would be to answer all the questions inside the PR description.

Atm this code changes are useless.

@ElGigi
Copy link
Author

Done, i hope that is ok for you ;).

@stale
Copy link

stalebot commentedJun 5, 2018

This issue/proposal has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up.
Thank you for contributing :)

@stalestalebot added the staleUsed to mark stale issues labelJun 5, 2018
@stalestalebot closed thisJun 12, 2018
@derkaiserreich
Copy link

Could this be reopened again as it is basically solved?

@Arkni
Copy link
Member

Sorry for this. I'll reopen it and will try to review it when I got some free time.

@ArkniArkni reopened thisJun 14, 2018
@stalestalebot removed the staleUsed to mark stale issues labelJun 14, 2018
@khansamad47
Copy link

Can this please be fixed

@staabm
Copy link
Member

staabm commentedOct 21, 2018
edited
Loading

@khansamad47 what exact problem do you see and does this fix provided here solve it?

@Tomanlu
Copy link

In what state is this issue? Can it be fixed?

@jameswilson
Copy link

jameswilson commentedFeb 23, 2022
edited
Loading

I'm seeing that this desperately needs tests to move forward. Sadly, tests were never added to this PR, per requested checklist in PR summary:

Your code should contain tests relevant for the problem you are solving.

When I went to test this using Drupal's Clientside Validation module viapatch adapted from the code in this pr, I immediately hit an issue where a date field should clearly pass, but fails.

Screen Shot 2022-02-22 at 11 54 13 AM

Relevant HTML snippet from Drupal, that could be adapted/simplified into a test case:

Min/Max is not calculated correctly:<inputtype="date"placeholder="YYYY-MM-DD"min="1902-01-01"max="2037-12-31"name="date"value="2022-02-22"size="12"/><inputtype="time"step="1"placeholder="hh:mm:ss"name="time"value="09:14:19"size="12"/>

I've setup a very complete jsbin to compare native html5 validation with each date type that demonstrates several issues related to min/max calculations and breakage due to the "step" attribute.

https://jsfiddle.net/w8jpygr2/

@omahane
Copy link

It's been a couple years,@ElGigi . Have you had a chance to revisit this?

@ElGigi
Copy link
Author

It's been a couple years,@ElGigi . Have you had a chance to revisit this?

I tried to fix it, but unfortunately I no longer use the library since I no longer use jQuery.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

8 participants
@ElGigi@staabm@derkaiserreich@Arkni@khansamad47@Tomanlu@jameswilson@omahane

[8]ページ先頭

©2009-2025 Movatter.jp