X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/cacc1525e7102dfef7964462a50e4ff13f02dcc6..e89856f733738fc6da704fb8a35598bbade37478:/lib/MECON/HTML/QuickForm/mdate.php?ds=inline 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