sfDatePickerTimePlugin - 0.1.0

Datepicker with a time selector

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

sfDatePickerTimePlugin plugin

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.

Installation

  • Install the plugin (via a package)

    $ symfony plugin:install sfDatePickerTimePlugin
    

Basic usage

  • 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
    ));

Example

  • 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%'
        )
    ));