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
Core: fix validation for input type="date" #2360
Conversation
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? |
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 |
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? |
@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 which should be tested is that a localized date input passes validation; but perhaps @staabm can accept this as a passable approximation. |
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/ (quoting https://github.com/jquery-validation/jquery-validation/blob/master/test/methods.js#L186 : "need to figure out how to test localized methods")
Fixes #2359