Ask your Symfony questions! Pay money and get answers fast! (more info)

Where do I find the missing sfWidgetFormJQueryDate images? Symfony

  • SOLVED

See attached image.

I am using sfWidgetFormJQueryDate for a widget, but the background images do not appear, so you can not really see it. I installed jquery and jquery ui like this:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>



What else do I need to do to get the background images to appear?

Answers (2)

2012-11-03

Milena Dimitrova answers:

On the screenshot you have attached it seems like there is no Jquery UI CSS loaded at all.
You can link to such a CSS like this:
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery-ui.css" type="text/css" media="all" />


Alternatively, you can download a Jquery UI theme from here: http://jqueryui.com/download/ and link to it either:
a) from view.yml (by adding it to section stylesheets: []), or
b) from the template itself <?php use_stylesheet('/path/to/jquery-ui.css') ?> , or
c) from the action $this->getResponse()->addStyleSheet("/path/to/jquery-ui.css"); (provided that you call include_stylesheets() from your template)

Then, in case images are still missing, you can use Firebug to inspect the calendar element and check where images location is supposed to be.

2012-11-04

Martin Palacio answers:

Milena is right, you didn't load the jquery ui CSS.
But beware, the sfWidgetFormJQueryDate (as from sfWidgetFormExtraPlugin) don't play well with jQuery UI 1.8+ (you will need the legacy version: 1.7.x)