]> git.llucax.com Git - mecon/meconlib.git/blobdiff - lib/MECON/HTML/QuickForm/mdate.php
- Cambio un query a BASE.Tabla
[mecon/meconlib.git] / lib / MECON / HTML / QuickForm / mdate.php
index 78aced3c42b990920b7e78eb574210d2cbf359f4..3c28d14b434ced50c6ac7df895a1387762b82d74 100644 (file)
@@ -87,11 +87,14 @@ class MECON_HTML_QuickForm_mdate extends HTML_QuickForm_date {
      * @return object Date.
      */
     function &getValue() {
-        if ($this->_selectedDate['Y']) {
+
+        $date = parent::getValue();
+    
+        if ($date['Y'][0]) {
             return new Date (@sprintf("%04d-%02d-%02d %02d:%02d:00",
-            $this->_selectedDate['Y'], $this->_selectedDate['F'],
-            $this->_selectedDate['d'], $this->_selectedDate['H'],
-            $this->_selectedDate['i']));
+            $date['Y'][0], $date['F'][0],
+            $date['d'][0], $date['H'][0],
+            $date['i'][0]));
         } else {
             return null;
         }
@@ -107,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'));