mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-26 07:49:28 +01:00
Fix typo, accept null values
This commit is contained in:
parent
d547545859
commit
452b7c98e1
@ -69,14 +69,15 @@ class etemplate_widget_date extends etemplate_widget_transformer
|
|||||||
$valid = (int)$value;
|
$valid = (int)$value;
|
||||||
}
|
}
|
||||||
// string with formatting letters like for php's date() method
|
// string with formatting letters like for php's date() method
|
||||||
elseif (($obs = DateTime::createFromFormat($this->attrs['dataformat'], $value)))
|
elseif (($obj = DateTime::createFromFormat($this->attrs['dataformat'], $value)))
|
||||||
{
|
{
|
||||||
$valid = $obj->format($this->attrs['dataformat']);
|
$valid = $obj->format($this->attrs['dataformat']);
|
||||||
}
|
}
|
||||||
else
|
// Null is acceptable also
|
||||||
|
elseif ($value !== null)
|
||||||
{
|
{
|
||||||
// this is not really a user error, but one of the clientside engine
|
// this is not really a user error, but one of the clientside engine
|
||||||
self::set_validation_error($name,lang("'%1' is not a valid date !!!", $value).' '.$this->dataformat);
|
self::set_validation_error($form_name,lang("'%1' is not a valid date !!!", $value).' '.$this->dataformat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user