From: Martín Marrese Date: Fri, 20 Jun 2003 14:09:38 +0000 (+0000) Subject: - Arregle la invocacion a la funcion Validate -> Estaba fallando X-Git-Tag: svn_import~465 X-Git-Url: https://git.llucax.com/mecon/meconlib.git/commitdiff_plain/12c3b7e967b107891284467e01c4e941223b29fe?ds=sidebyside - Arregle la invocacion a la funcion Validate -> Estaba fallando --- diff --git a/lib/MECON/HTML/QuickForm/mdate.php b/lib/MECON/HTML/QuickForm/mdate.php index de9c54b..2697234 100644 --- a/lib/MECON/HTML/QuickForm/mdate.php +++ b/lib/MECON/HTML/QuickForm/mdate.php @@ -118,8 +118,10 @@ class HTML_QuickForm_mdate extends HTML_QuickForm_date */ function validate($valor, $nombre, $formato = '') { + $str = sprintf ("%4d-%02d-%02d",$valor['Y'],$valor['F'],$valor['d']); + if ($valor['Y'] != '--' && $valor['d'] != '--' && $valor['F'] != '--') { - return Validate::date($valor['Y'].'-'.$valor['d'].'-'.$valor['F'], array('format' => '%Y-%m-%d')); + return Validate::date($str, array('format' => '%Y-%m-%d')); } return true; } // end func validate