-
Notifications
You must be signed in to change notification settings - Fork 403
jQuery Plugins
fgrehm edited this page Oct 18, 2012
·
11 revisions
If you are using jQuery DatePicker in a field and trying to validate it with Client Side Validations it wont work, because it doesn't trigger the "change" or "focusout" events from the field. To fix it just add this option on the DatePicker:
onClose: function(dateText, inst) { $(inst.input).change().focusout(); }
Example:
$(".date_fields").datePicker({
onClose: function(dateText, inst) { $(inst.input).change().focusout(); },
changeMonth: true,
changeYear: true
})
If you are using jQuery maskedinput in a field and trying to validate it with Client Side Validations it wont work, because it doesn't trigger the "change" or "focusout" events from the field. To fix it you'll need to attach a blur.mask
event handler:
$('.masked_field').mask('99/99/9999').bind('blur.mask', function() {
$(this).data('changed', true).focusout();
});