From a3dc3e3d6c0f777348f144c144b3e26cb62f1833 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mart=C3=ADn=20Marrese?= Date: Mon, 26 Jan 2004 15:08:18 +0000 Subject: [PATCH] BugFix. Acomodo getValue para que funcione con los cambios nuevos. --- lib/MECON/HTML/QuickForm/mdate.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/MECON/HTML/QuickForm/mdate.php b/lib/MECON/HTML/QuickForm/mdate.php index e454287..3c28d14 100644 --- a/lib/MECON/HTML/QuickForm/mdate.php +++ b/lib/MECON/HTML/QuickForm/mdate.php @@ -90,11 +90,11 @@ class MECON_HTML_QuickForm_mdate extends HTML_QuickForm_date { $date = parent::getValue(); - if ($date['Y']) { + if ($date['Y'][0]) { return new Date (@sprintf("%04d-%02d-%02d %02d:%02d:00", - $date['Y'], $date['F'], - $date['d'], $date['H'], - $date['i'])); + $date['Y'][0], $date['F'][0], + $date['d'][0], $date['H'][0], + $date['i'][0])); } else { return null; } @@ -110,7 +110,7 @@ class MECON_HTML_QuickForm_mdate extends HTML_QuickForm_date { * @return bool */ function validate($valor, $nombre, $formato = '') { - // Si viene completamente lleno, se valida con el paquete Validate. + // Si viene completamente lleno, se valida con el paquete Validate if ($valor['Y'] and $valor['d'] and $valor['F']) { $str = sprintf('%4d-%02d-%02d', $valor['Y'], $valor['F'], $valor['d']); return Validate::date($str, array('format' => '%Y-%m-%d')); -- 2.43.0