mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Etemplate - fix using date widget min/max attributes made it required, even if not set as such
This commit is contained in:
parent
af88cc0822
commit
f71b9ba093
@ -179,7 +179,7 @@ class Date extends Transformer
|
||||
$valid = (string)$value === '' ? '' : (int)$value;
|
||||
}
|
||||
|
||||
if (!empty($this->attrs['min']))
|
||||
if (!empty($this->attrs['min']) && !empty($value))
|
||||
{
|
||||
if(is_numeric($this->attrs['min']))
|
||||
{
|
||||
@ -203,7 +203,7 @@ class Date extends Transformer
|
||||
$value = $min;
|
||||
}
|
||||
}
|
||||
if (!empty($this->attrs['max']))
|
||||
if (!empty($this->attrs['max']) && !empty($value))
|
||||
{
|
||||
if(is_numeric($this->attrs['max']))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user