JQuery UI Datepicker and bassistance.de connection issue

I have a jQuery UI Datepicker and bassistance.de validator plugin except for one problem. When a date is selected using a date picker, it throws a validation error even if the date is correct. I tried this on different sites and I have the same problem. This does not throw a validation error when the submit button is clicked.

+2


source to share


2 answers


I think I found the answer. The problem is the jQuery validator plugin is checked for click, keyup or onfocusout event. Not sure which one. I just turned them off, so it will only do it on feed, which will look cleaner to my implementation.

These are the values ​​I set to false:



onfocusout: false, onkeyup: false, onclick: false

+1


source


I had this problem when I was using a datepicker with default settings.

When I exited it looked like the problem is being thrown when you select a new date on the picker, but gets passed the existing value and not the one you just selected.



After the collector is closed, you are no longer at the input, so the check does not run again, meaning it will never be called with the correct value.

Button usage and fix in jQuery UI Datepicker loses focus when selecting date with mouse I was able to get these two games together. That is, after picking a new date, the focus is still on the date input, and tab / click will force correct validation.

+1


source







All Articles