![]() |
|
sfDatePickerTimePlugin - 0.1.5Datepicker with a time selector |
|
The sfDatePickerTimePlugin is a symfony plugin that provides a hybrid jQuery datepiker
and a time selector widget based on the classic sfWidgetFormDateTime widget.
This widget require jQuery and jQueryUI.
Install the plugin (via a package)
$ symfony plugin:install sfDatePickerTimePlugin
Default options
$this->widgetSchema['date'] = new sfWidgetFormDatePickerTime();
Custom options
$this->widgetSchema['date'] = new sfWidgetFormDatePickerTime(array( 'date' => array('option' => 'value'), // Options for the sfWidgetFormDatePicker 'time' => array('option' => 'value') // Options for the sfWidgetFormTime ));
Custom options and additionnal jQuery datepicker options
$this->widgetSchema['date'] = new sfWidgetFormDatePickerTime(array( 'date' => array( 'option' => 'value', // Options for the sfWidgetFormDatePicker 'jq_picker_options' => array( 'option' => 'value' // Options for the jQuery datepicker - http://jqueryui.com/demos/datepicker/#options ) ), 'time' => array('option' => 'value') // Options for the sfWidgetFormTime ));
Theses options are used in the example screenshot
$this->widgetSchema['date_naissance'] = new sfWidgetFormDatePickerTime(array( 'date' => array( 'jq_picker_options' => array( 'buttonImage' => '/images/ul/icones/calendrier.gif', 'buttonImageOnly' => true, 'showOn' => 'button' ) ), 'time' => array( 'format_without_seconds' => '%hour% h %minute%' ) ));