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

Client-side validation GreaterThan, LessThan not working correctly with input type="date" #37

Open
AhmedMSedeek opened this issue May 31, 2023 · 7 comments

Comments

@AhmedMSedeek
Copy link

Client-side validation GreaterThan, LessThan not working correctly with input type="date"
Always says the field is invalid even if the data is entered correctly
Test case:
Two datetime? fields, with input type=date

@rpgkaiser
Copy link
Owner

Hi @AhmedMSedeek,
I'll check this ASAP, but right now I'm very short of time.
Thanks for your feedback.

@AhmedMSedeek
Copy link
Author

Thank you very much for putting time and effort in this project, it saves a lot of time :)

@rpgkaiser
Copy link
Owner

Hi @AhmedMSedeek,
After looking into the JavaScript code that execute the validation (file mvcfoolproof.core.js line 22), I guess the problem may be related with the datetime format you are using, that seems to be different from the one used by the validation logic.
In that case, the values are validated like texts instead of datetime.
I'll try to figure out a better way to handle datetime values, letting override the datetime format to use, or using the format defined in the client localization config.
In the meantime, you will need to use en-US datetime format.

@rpgkaiser
Copy link
Owner

Hi @AhmedMSedeek, can we close this issue already?

@AhmedMSedeek
Copy link
Author

@rpgkaiser
Thanks for your reply,
However, if I understand correctly, This issue is not resolved yet as the validation logic on client-side breaks with all datetime formats other than en-US, if this is the case, I believe the issue should not be close, unless it is not planned to be supported

@rpgkaiser
Copy link
Owner

Hi @AhmedMSedeek. A new version was released. This issue should be resolved with this new version.

@rpgkaiser
Copy link
Owner

Hi @AhmedMSedeek, could you please verify this issue was fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants