Skip to content
bernardomendes edited this page Apr 27, 2011 · 11 revisions

jQuery Plugins

jQueryUI DatePicker

If you are using jQuery DatePicker in a field and trying to validate that i 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
})