QuickForm date Format problem

From: Date: Fri, 20 Aug 2004 05:54:25 +0000
Subject: QuickForm date Format problem
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14192@lists.php.net to get a copy of this message
Hi, I am quite new to PEAR, but so far I managed (thanks to this mailing list !) to use DataObject with QuickForm and Smarty and my life is much better now. I noticed something a little bit strange in the format option for the date element. Here is my code: <?php include_once("HTML/QuickForm.php"); $form = new HTML_QuickForm(); $date_option = array('format' => 'Y \y m \m d \d'); $form->addElement('date', 'start_date' ,"Start",$date_option); $form->addElement('submit', 'submit', 'submit'); $form->display(); ?> In the output the "d" after the day select box does'nt appear : <select name="start_date[Y]"> <option >...</option></select>&nbsp;y&nbsp; <select name="start_date[m]"> <option ... </option></select>&nbsp;m&nbsp; <select name="start_date[d]"> <option .. </option></select> If I submit the form then the "d" appears: <select name="start_date[Y]"> <option >...</option></select>&nbsp;y&nbsp; <select name="start_date[m]"> <option ... </option></select>&nbsp;m&nbsp; <select name="start_date[d]"> <option .. </option></select>&nbsp;d&nbsp; Is this a bug ? Any idea how to fix it ? I use QuickForm 3.2.3, and Php 4.3.3. Thank you !

« previous php.pear.general (#14192) next »