I'm using Zend framework with Bootstrap and ReverseForm adapter, and have an interesting problem with it: when I use Bootstrap Datepicker in Zend Form I've the next exception:
Object provided to Escape helper, but flags do not allow recursion
There is my code of formfield:
use \Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
use \Zend\Form\Annotation as ZFA;
...
/**
* @var \DateTime
*
* @ODM\Date
*
* @ZFA\Type("ReverseForm\Element\BootstrapDatepicker")
* @ZFA\Attributes({"type":"text"})
* @ZFA\Options({
* "label":"Date",
* "extended": {
* "help": {"content": ""},
* }
* })
*
*/
private $date;
and there is my reverse form config:
'ReverseForm\Element\BootstrapDatepicker' => array(
'js' => array(
'/vendor/datepicker/js/bootstrap-datepicker.js'
),
'css' => array(
'/vendor/datepicker/css/datepicker.css'
),
'template' => 'input.phtml',
'inlineJs' => "$('#%1\$s').datepicker(%2\$s);",
'inlineJsConfig' => array(
'format' => 'dd.mm.yyyy',
'weekstart' => new \Zend\Json\Expr(1),
)
),
Where I have a mistake?