- return new Date (sprintf("%04d/%02d/%02d 00:00:00",$this->_selectedDate['y'],$this->_selectedDate['m'],$this->_selectedDate['d']));
- } // end func _createNumericOptionList
+ if ($this->_selectedDate['Y'] != 00) {
+ return new Date (sprintf("%04d-%02d-%02d 00:00:00",$this->_selectedDate['Y'],$this->_selectedDate['F'],$this->_selectedDate['d']));
+ }
+ else {
+ return null;
+ }
+ } // end func getValue
+
+ /**
+ * Verifica que una fecha sea valida.
+ *
+ * Verifica que una fecha sea valida. El formato siempre debe ser
+ * '%Y-%m-%d'
+ *
+ * @access public
+ * @return bool
+ */
+ function validate($fecha)
+ {
+ return Validate::date($fecha, array('format' => '%Y-%m-%d'))
+ } // end func validate