0

I am trying to add a datepicker to my Zend_Form. This works all right, but only if I don't add a stylesheet to the jQuery object. If I add a stylesheet, the datepicker just stops working. Here is my bootstrap:

<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

    protected function _initViewHelpers()
    {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
        $view->jQuery()->uiEnable();
        $view->jQuery()->addStylesheet('/backoffice/css/jquery.css');
    }


}

?>

I know the stylesheet is applied, because there are some warnings from Firefox about the zoom and the filter property. There are no javascript errors however, but it has just stopped working. The javascript code is generated okay, and the proper files are included. I'm completely dumb-struck, could someone please help? Thanks in advance!

Charles
  • 50,943
  • 13
  • 104
  • 142
rbnvrw
  • 347
  • 3
  • 15

2 Answers2

0

Why dont you use

$this->headLink()->appendStylesheet('/backoffice/css/jquery.css');
echo $this->headTitle();

in your layout?

IcanDivideBy0
  • 1,627
  • 11
  • 17
  • Thanks for your suggestion. I have tried this, but the result is the same. If I comment out the rule, the datepicker is displayed, if I don't, it's not. – rbnvrw Dec 11 '10 at 15:43
0

I have already solved it. It seems the css file was corrupted, I used an old file and it worked. Thanks!

rbnvrw
  • 347
  • 3
  • 15