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

Datefield does not validate (NL locale) #1105

Closed
micschk opened this issue Sep 10, 2021 · 2 comments
Closed

Datefield does not validate (NL locale) #1105

micschk opened this issue Sep 10, 2021 · 2 comments

Comments

@micschk
Copy link
Contributor

micschk commented Sep 10, 2021

When a userform in NL locale includes a date field, it cannot be submitted because the date is considered invalid.
I've found some comparable resolved/closed issues but this is happening on a site which is on userforms 5.9.2:

Screenshot 2021-09-10 at 17 43 42

@micschk
Copy link
Contributor Author

micschk commented Sep 11, 2021

Upon investigating this further, seems to be an issue with jQuery validate.
See: jquery-validation/jquery-validation#2359
And: jquery-validation/jquery-validation#2360

Quick fix seems to temporarily block the localization altogether:

// Temporarily block jQuery validation localization because that breaks date inputs:
Requirements::block("silverstripe/userforms:client/dist/js/jquery-validation/localization/methods_nl.min.js");

@micschk micschk closed this as completed Sep 11, 2021
@ovogel-wigital
Copy link

Had the some problem with locale de. Blocking localization helped but seems like a dirty hack. Issue should be reopened and investigated further.

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