Hi all i have a time field in form as below

$time = new Zend_Form_Element_Text('time');
$time->setValue($breaks->getBreakStart());
$time->addFilter(new Zend_Filter_PregReplace('/^([0-9]+)$/', '$0:00'));
$time->addValidator(new Zend_Validate_Date('HH:mm'))
           ->setRequired();

By this form i need to enter both 01:00 and 1 .If we enter both the value i
don't want any error message.

But igot a notice when enter like "Notice: Undefined index: second in
/var/www/oktopos.net/test/manager3/library/Zend/Date.php on line 2315"

In controller i wrote like this

$time = new Zend_Date($this->_getParam('time'), 'HH:mm');

and set time as

$employee->setTime = $time->toString(Zend_Date::TIMES);

Pls help me to avoid the notice
-- 
View this message in context: 
http://n4.nabble.com/Zend-date-issue-tp1588567p1588567.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to