Deleted javascript/CalendarDateField.js. The file is empty.

MINOR: Deleted reference to CalendarDateField.js
MINOR: Year validation (accept just 4 digit, like the error message says).


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97991 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Carlos Barberis 2010-02-02 03:15:19 +00:00 committed by Sam Minnee
parent 15e98877f5
commit e1f025d1d1
2 changed files with 1 additions and 2 deletions

View File

@ -17,7 +17,6 @@ class DMYCalendarDateField extends CalendarDateField {
Requirements::css(SAPPHIRE_DIR . "/css/CalendarDateField.css");
Requirements::css(THIRDPARTY_DIR . "/calendar/calendar-win2k-1.css");
Requirements::javascript(SAPPHIRE_DIR . "/javascript/NumericField.js");
Requirements::javascript(SAPPHIRE_DIR . "/javascript/CalendarDateField.js");
$field = DateField::Field();
@ -75,7 +74,7 @@ Behaviour.register({
var value = day_value + '/' + month_value + '/' + year_value;
if(value && value.length > 0 && !value.match(/^[0-9]{1,2}\/[0-9]{1,2}\/([0-9][0-9]){1,2}\$/)) {
if(value && value.length > 0 && !value.match(/^[0-9]{1,2}\/[0-9]{1,2}\/[1-2]([0-9]){3}\$/)) {
validationError(_CURRENT_FORM.elements[fieldName+'[Day]'],"$error","validation",false);
return false;
}