X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/d374755a39b0fc94d14a25590acea0a3f5ce6633..3d2f06e5bcc1078acd715ea803eb0bba109ec79a:/lib/MECON/HTML/QuickForm/mdate.php diff --git a/lib/MECON/HTML/QuickForm/mdate.php b/lib/MECON/HTML/QuickForm/mdate.php index 803fd31..7117db2 100644 --- a/lib/MECON/HTML/QuickForm/mdate.php +++ b/lib/MECON/HTML/QuickForm/mdate.php @@ -47,14 +47,17 @@ class MECON_HTML_QuickForm_mdate extends HTML_QuickForm_date { * @return void */ function MECON_HTML_QuickForm_mdate($elementName=null, $elementLabel=null, $options=array(), $attributes=null) { - $this->_options = array ('es' => array ( + $this->_locales = array ('es' => array ( 'weekdays_short'=> array ('' => '--', 'Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'), 'weekdays_long' => array ('' => '--', 'Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'), 'months_short' => array ('' => '--', 'Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'), - 'months_long' => array ('' => '--', 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septimbre', 'Octubre', 'Noviembre', 'Diciembre') + 'months_long' => array ('' => '--', + 'Enero', 'Febrero', 'Marzo', + 'Abril', 'Mayo', 'Junio', + 'Julio', 'Agosto', 'Septiembre', + 'Octubre', 'Noviembre', 'Diciembre') ) ); - parent::HTML_QuickForm_date($elementName, $elementLabel, array_merge(array('language'=>'es','format'=>'d F Y'), $options), $attributes); @@ -95,7 +98,10 @@ class MECON_HTML_QuickForm_mdate extends HTML_QuickForm_date { */ function &getValue() { if ($this->_selectedDate['Y']) { - return new Date (sprintf("%04d-%02d-%02d 00:00:00",$this->_selectedDate['Y'],$this->_selectedDate['F'],$this->_selectedDate['d'])); + 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'])); } else { return null; }