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

jQuery Validation Plugin for date format #1091

Closed
titibouboul opened this issue Jun 25, 2014 · 4 comments
Closed

jQuery Validation Plugin for date format #1091

titibouboul opened this issue Jun 25, 2014 · 4 comments

Comments

@titibouboul
Copy link

When I use as: :date in SimpleForm & jQuery Validation plugin, I have the following error for the day selection:
<label for="user_birthdate_3i" class="error">Please enter a valid date.</label>
I've tried ignore: "#user_birthdate_3i", but it does not work..

Rails function date_select is working correctly with jQuery Validation.

I would love to help, but I have no idea why this select for days is showing an error.
ps: I think it is showing an error when day > 12

@rafaelfranca
Copy link
Collaborator

Can you please provide a sample application that reproduces the error?

@Petercopter
Copy link

Having the same problem. It's because simple_form adds the 'date' class to the input, and thats a trigger for jQuery Validate. I thought it shouldn't trigger without the 'required' class or HTML5 attribute, but it does.

Switching to rails form helper to bypass.

@rafaelfranca
Copy link
Collaborator

You can disable these class generation using the generate_additional_classes_for configuration. I believe this is more an issue on jQuery Validate so I'm closing.

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

No branches or pull requests

3 participants