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 never validated as true, DatePicker shows up, form is not send #205

Closed
spierala opened this issue Apr 22, 2014 · 6 comments
Closed

Comments

@spierala
Copy link

This issue occurs with DateField set as required Field. Set the Date via DatePicker, then press Send always brings up the DatePicker again like there was never set a Date.

screen shot 2014-04-22 at 10 46 48

@wilr
Copy link
Member

wilr commented Apr 23, 2014

This could be because the format is not valid (requires /) rather than slashes. The custom script UserFormsValidation probably needs to pass the date locale.

@spierala
Copy link
Author

spierala commented May 2, 2014

thanks! i solved it now by extending UserDefinedForm and handing over in the init function this: Requirements::javascript('userforms/thirdparty/jquery-validate/localization/methods_de.js');
then it validates nicely the german date format.

@mmichelli
Copy link

Had the same issue with Norwegian, but just added the methods_no.min.js file.

https://gist.github.com/mmichelli/43bce54802ac8b008e17

@sekjal
Copy link

sekjal commented May 23, 2016

I'm noticing that DateField doesn't engage it's validation if tabbed into the first time, instead of clicked. This allows users to provide bad input (wrong date format, for example) which results in a validation issue. On my setup, this does not engage the normal validation error messages, and has been netting me lots of phone calls by confused users.

Changing the method from 'click' to 'focus' on javascript/UserForm.js line 710 seems to resolve this error, and allow for keyboard-centric users to have an easier time.

This may or may not be the solution to the original problem, but it seems related enough to be worthy of comment.

@tractorcow
Copy link
Contributor

To fix we need to make sure the correct jquery-validate localisation library is included for the current locale.

@wilr
Copy link
Member

wilr commented Sep 26, 2017

This uses the browser date picker now.

@wilr wilr closed this as completed Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants