X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/eee21d728f349cbda8970732622f00e6d5610ef1..e37b8be2410476618464256a7f6575a68071b660:/HTML/php/QuickForm/mdate.php?ds=sidebyside diff --git a/HTML/php/QuickForm/mdate.php b/HTML/php/QuickForm/mdate.php index 7f89537..d1b73ef 100644 --- a/HTML/php/QuickForm/mdate.php +++ b/HTML/php/QuickForm/mdate.php @@ -118,7 +118,12 @@ class HTML_QuickForm_mdate extends HTML_QuickForm_date */ function validate($valor, $nombre, $formato = '') { - return Validate::date($valor['Y'].'-'.$valor['d'].'-'.$valor['F'], array('format' => '%Y-%m-%d')); + if ($valor['Y'] != '--' && $valor['d'] != '--' && $valor['m'] != '--') { + return Validate::date($valor['Y'].'-'.$valor['d'].'-'.$valor['F'], array('format' => '%Y-%m-%d')); + } + else { + return false; + } } // end func validate } ?>