Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Core: fix validation for input type="date"#2360
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
micschk commentedSep 11, 2021
Would be nice if this could be merged (assuming it indeed fixes date inputs). |
Could you verify wether it fixes the mentioned problem and also add a unit test? |
nenadvicentic commentedDec 7, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi, I tested this change on Overwritten original Is there any elegant way to monkey-patch this until the fix is officially released? |
In case we get a unit test for the expected behavior which passes with thxis change, we could merge the PR |
nenadvicentic commentedDec 7, 2021
I am not familiar with jQuery source or tests, so not sure if I personally can help. My intuition tells me, unit tests where for @staabm Any tip where this test can be added/implemented? |
nenadvicentic commentedDec 7, 2021
@tyomitch,@staabm Boys, there example of your unit-test: QUnit.test("rules() - returns dateISO for input type=date",function(assert){$("#rangesMinDateInvalid").validate();assert.deepEqual($("#minDateInvalid").rules(),{dateISO:true,min:"2012-12-21"});}); It can be added to |
@nenadvicentic done, updated the patch with your test case. The scenario whichshould be tested is that a localized date input passes validation; but perhaps@staabm can accept this as a passable approximation. |
nenadvicentic commentedDec 10, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
By specification value property of So test that
@tyomitch ,@staabm : more I am thinking about this scenario, I am wondering if there is a need for validation at all in this case, since browser ensures that, if |
This issue/proposal has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automatically 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. |
I think this is wrong, and the problem still persists. |
No tests here, because none are possible with methods from localization/ (quotinghttps://github.com/jquery-validation/jquery-validation/blob/master/test/methods.js#L186 : "need to figure out how to test localized methods")
Fixes#2359