From e1f025d1d105f8e294e77a151918178bfac3d461 Mon Sep 17 00:00:00 2001 From: Carlos Barberis Date: Tue, 2 Feb 2010 03:15:19 +0000 Subject: [PATCH] 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 --- forms/DMYCalendarDateField.php | 3 +-- javascript/CalendarDateField.js | 0 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100755 javascript/CalendarDateField.js diff --git a/forms/DMYCalendarDateField.php b/forms/DMYCalendarDateField.php index 35db1409c..ba5915c36 100755 --- a/forms/DMYCalendarDateField.php +++ b/forms/DMYCalendarDateField.php @@ -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; } diff --git a/javascript/CalendarDateField.js b/javascript/CalendarDateField.js deleted file mode 100755 index e69de29bb..000000000