MOvEJQueryUIPlugin - 1.0.3

Widgets and helpers for jQueryUI

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source



This plugin makes use of jQuery UI library.

This plugin provides widgets and helpers so you can easily integrate jQueryUI into your symfony project. Currently only one widget is available, MOvEWidgetFormDateJQueryUI which uses jQuery DatePicker to choose a date. The Widget displays one input tag (not three seperated input tags for year, month and day like the jQueryUI datepicker Widget in sfFormExtraPlugin).

This plugin uses the jQuery library - so its not compatible with sfProtoculousPlugin (which has to be disabled).


This Plugin requires the jquery library itself, which is included in the plugin, and can be inserted with the getJavaScripts() method. Also included are the stylesheets of all the standard UI themes. Insert with getStyleSheets().


$ symfony plugin:install MOvEJQueryUIPlugin
$ symfony cache:clear

If you're installing from the archive, do not forget to copy the contents of the Plugin's web directory to your project's web directory, either by hand or with:

$ symfony plugin:publish-assets

sfWidgetFormDateJQueryUI Usage

In your form class:

$this->widgetSchema['my_date']= new MOvEWidgetFormDateJQueryUI(array("change_month" => true, "change_year" => true)),

sfWidgetFormDateJQueryUI Customization

Yuo can configure Widget with following options:

  • culture : Configure culture for the widget, defaults to sfContext::getInstance()->getUser()->getCulture()
  • change_month : If datepicker attached to widget has month dropdown, defaults to false
  • change_year : If datepicker attached to widget has year dropdown, defaults to false
  • number_of_months : Number of months visible in datepicker, defaults to 1
  • show_button_panel : If datepicker shows panel with 'today' and 'done' buttons, defaults to false
  • theme : Css theme for jquery ui interface, can be either the name of a standard jQueryUI theme (which are all included), or the path to a custom theme, you can make here. Defaults to 'ui-lightness'
  • altField : ID of a second formfield that will get populated with the picked date.
  • dateFormat : Format in which the date will be displayed. See jQueryUI documentation for options.
  • defaultDate : Sets defaultDate. This uses the $value param from the render method, if option is not set.


Widget is simple text input tag, date chooser appears after input is focused/clicked. User can still input date by hand. I recommend to use date validator.

When using widget, do not forget to use css and javascript in your form template:

<?php use_stylesheets_for_form($your_form) ?>
<?php use_javascripts_for_form($your_form) ?>