Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #4781 Without setDefaults(), date format doesn't work correctly.
Submitted: 2005-07-10 06:36 UTC
From: sakamoto-gsyc-3s at glamenv-septzen dot net Assigned: avb
Status: Closed Package: HTML_QuickForm
PHP Version: 4.3.11 OS: WinXP
Roadmaps: (Not assigned)    
Subscription  


 [2005-07-10 06:36 UTC] sakamoto-gsyc-3s at glamenv-septzen dot net
Description: ------------ I use HTML_QuickForm 3.2.4pl1 and ArraySmartyRenderer. Without setDefaults(), date format seems not to work correctly. Especially, 'prefix/suffix' parts, as 'format' key which passed in date element constructor, seems not to be outputted in html. I tried to solve this problem, I changed toHtml() in date.php like this and I could solve this problem. function toHtml() { // before $renderer->setElementTemplate($this->_wrap[0] . '{element}' . $this->_wrap[1]); parent::accept($renderer); return $renderer->toHtml(); // after $renderer->setElementTemplate('{element}'); parent::accept($renderer); eturn $this->_wrap[0].$renderer->toHtml().$this->_wrap[1]; } Reproduce code: --------------- $form->addElement('date', 'date1', 'date1_capt', array('format' => '--prefix-- Y m d --suffix--', ... // If use setDefaults(), '--prefix--', '--suffix--' are shown. $form->setDefaults(array('date1' => array('Y'=> ... // Without setDefaults(), those are NOT shown.

Comments

 [2005-07-22 14:28 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!