BUGFIX: Fixed usability issue with CalendarDateField required field validation. Slightly over-coupled; resolve that in the jQuery validation rewrite.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2@65490 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-11-09 23:37:42 +00:00
parent b38253c2e0
commit 6ae1692c27

View File

@ -108,7 +108,12 @@ Behaviour.register({
}, },
onblur : function() { onblur : function() {
if(this.old_onblur()) { if(this.old_onblur()) {
return $('$formID').validate(this); // Don't perform instant validation for CalendarDateField fields; it creates usability wierdness.
if(this.parentNode.className.indexOf('calendardate') == -1 || this.value) {
return $('$formID').validate(this);
} else {
return true;
}
} }
} }
}, },