mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
15e98877f5
commit
e1f025d1d1
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user