Snippet: sfWidgetFormJQueryDate for Spanish culture
-
Be sure that sfFormExtraPlugin is installed:
$ php symfony plugin:install sfFormExtraPlugin -
In the template:
<?php use_javascript('ui/i18n/jquery-ui-i18n.js') ?>
-
In the filter or form:
$this->widgetSchema['my_date_field'] = new sfWidgetFormJQueryDate(array( 'culture' => 'es', 'format' => '%day%/%month%/%year%', 'config' => '{"showMonthAfterYear": false, "firstDay": 1 }' ));
More info on ‘config’ option in http://jqueryui.com/demos/datepicker.
Category: Symfony | Tags: date, forms, jquery, snippet Comment »
