forked from extern/egroupware
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;
|
$valid = (string)$value === '' ? '' : (int)$value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($this->attrs['min']))
|
if (!empty($this->attrs['min']) && !empty($value))
|
||||||
{
|
{
|
||||||
if(is_numeric($this->attrs['min']))
|
if(is_numeric($this->attrs['min']))
|
||||||
{
|
{
|
||||||
@ -203,7 +203,7 @@ class Date extends Transformer
|
|||||||
$value = $min;
|
$value = $min;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($this->attrs['max']))
|
if (!empty($this->attrs['max']) && !empty($value))
|
||||||
{
|
{
|
||||||
if(is_numeric($this->attrs['max']))
|
if(is_numeric($this->attrs['max']))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user