jtimepicker A simple extension for time fields similar to the date picker widget.

  1. Requirements
  2. Usage
  3. Resources
  4. Update
  5. Important

This is a wrapper of the excellent JQuery timepicker widget by Frank Galinas

Frank's Website

Requirements

Should work in V1.1 and above, only tested in 1.1.7.
See the note below regarding jui themes.

Usage

Just like the date picker widget, include this in your view file where time input is required.

Unpack the attached zip file into your extensions directory.

<?php
 $this->widget('application.extensions.jui_timepicker.JTimePicker', array(
    'model'=>$model,
     'attribute'=>'start_time',
     // additional javascript options for the date picker plugin
     'options'=>array(
         'showPeriod'=>true,
         ),
     'htmlOptions'=>array('size'=>8,'maxlength'=>8 ),
 ));
?>

Resources

Update

  • Now tested on 1.1.8

Important

It is very important that you are theming other widgets then you must theme this widget also. I suggest that you set this up in your config file. example:

<?php 

            'widgetFactory'=>array(
            'widgets'=>array(
                'CJuiAccordion'=>array(
                    'options'=>array(
                        'animated'=>'bounceslide',
                        ),
                    'theme'=>'le-frog',
                    'themeUrl'=>'/themes/nfa/jui',
                    ),
                'CJuiButton'=>array(
                    'theme'=>'le-frog',
                    'themeUrl'=>'/themes/nfa/jui',
                ),
                'CJuiDatePicker'=>array(
                    'theme'=>'le-frog',
                    'themeUrl'=>'/themes/nfa/jui',
                ),
                'JTimePicker'=>array(
                  'theme'=>'le-frog',
                  'themeUrl'=>'/themes/nfa/jui',
                ),
                'CGridView'=>array(
                    'cssFile'=>'/themes/nfa/gridview/styles.css',
                    ),
                /* end of widgets */
                ),
            ),
//            
?>
5 0
10 followers
1 841 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: got 2 doodle
Created on: Jun 17, 2011
Last updated: 13 years ago

Downloads

show all

Related Extensions