2 /* vim: set expandtab tabstop=4 shiftwidth=4: */
3 // +----------------------------------------------------------------------+
5 // +----------------------------------------------------------------------+
6 // | Copyright (c) 1997-2003 The PHP Group |
7 // +----------------------------------------------------------------------+
8 // | This source file is subject to version 2.0 of the PHP license, |
9 // | that is bundled with this package in the file LICENSE, and is |
10 // | available at through the world-wide-web at |
11 // | http://www.php.net/license/2_02.txt. |
12 // | If you did not receive a copy of the PHP license and are unable to |
13 // | obtain it through the world-wide-web, please send a note to |
14 // | license@php.net so we can mail you a copy immediately. |
15 // +----------------------------------------------------------------------+
16 // | Authors: Martin Marrese
17 // | Date: jue jun 5 17:59:44 ART 2003
18 // +----------------------------------------------------------------------+
30 require_once('HTML/QuickForm/date.php');
33 * Class to dynamically create HTML Select elements from a date
34 * Modificado para que cumpla con los requisitos de mecon
37 class HTML_QuickForm_mdate extends HTML_QuickForm_date
44 * @param string $elementName (optional)Input field name attribute
45 * @param string $value (optional)Input field value
46 * @param mixed $attributes (optional)Either a typical HTML attribute string
47 * or an associative array. Date format is passed along the attributes.
51 function HTML_QuickForm_mdate($elementName=null, $elementLabel=null, $options=array(), $attributes=null)
53 foreach ($this->_options as $opts) {
54 foreach ($opts as $opp) {
58 parent::HTML_QuickForm_date($elementName, $elementLabel, $options, $attributes);
62 // {{{ _createNumericOptionList()
65 * Creates a numeric option list based on a start number and end number
67 * @param int $start The start number
68 * @param int $end The end number
71 * @return array An array of numeric options.
73 function _createNumericOptionList($start, $end)
76 for ($i = $start; $i <= $end; $i++) {
77 $options[$i] = sprintf('%02d', $i);
79 array_push($options,'--');
82 } // end func _createNumericOptionList