X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/1f832da2160a81b79a66d97871b8ef61fecc0d7e..ea2811f6466500bc034b1c7a29a8ba75b1b490d4:/HTML/php/QuickForm/mdate.php diff --git a/HTML/php/QuickForm/mdate.php b/HTML/php/QuickForm/mdate.php index 751830d..6be63e1 100644 --- a/HTML/php/QuickForm/mdate.php +++ b/HTML/php/QuickForm/mdate.php @@ -116,9 +116,12 @@ class HTML_QuickForm_mdate extends HTML_QuickForm_date * @access public * @return bool */ - function validate($fecha) + function validate($valor, $nombre, $formato = '') { - return Validate::date($fecha, array('format' => '%Y-%m-%d')) + if ($valor['Y'] != '--' && $valor['d'] != '--' && $valor['F'] != '--') { + return Validate::date($valor['Y'].'-'.$valor['d'].'-'.$valor['F'], array('format' => '%Y-%m-%d')); + } + return true; } // end func validate } ?>