php - ZF2 - issue with implementing Bootstrap Datetime picker in edit mode -
i implemented eonasdan-bootstrap-datetimepicker in zf2 application.
see here implementation in add mode:
<div class="form-group <?= ($this->formelementerrors($event->get('date'))) ? 'has-error' : ''; ?>"> <?php echo $this->formlabel($event->get('date')) . php_eol; ?> <div class="input-group date" id='date'> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> <?php echo $this->formtext($event->get('date')) . php_eol; ?> </div> <?php echo $this->formelementerrors($event->get('date')) . php_eol; ?> </div> <script type="text/javascript"> $(function() { $('#date').datetimepicker({ format: 'dd-mmm-yyyy' }); }); </script>
this works fine. in edit mode have same implementation, receive zend\view\exception\invalidargumentexception
object provided escape helper, flags not allow recursion
this due fact pass date object text field. in eonasdan-bootstrap-datetimepicker needs input field of type text.
anybody suggestions on how deal or maybe working example?
thanks.
Comments
Post a Comment