timepicker extension help

Hello, I downloaded the timepicker v3 at http://www.yiiframework.com/extension/timepicker/, and I just extracted all of its contents to /framework/zii/widgets/timepicker. However, when I try to call an instance of it with




$this->widget('zii.widgets.timepicker.timepicker', array(

    'model'=>$model,

    'name'=>'publicated',

));



it gives me the error: The asset “/var/prmm/framework/zii/widgets/timepicker/assets” to be published does not exist. I’m guessing I’m supposed to make an assets folder inside the timepicker folder but I’m not sure which files to put in there, or even if this is the right widgets folder. The installation instructions are horrible (“Extract the release file”). There are .js, .css, .php files, and some images in the zip. Any help is appreciated, thanks.

Please note that extension are not part of the Yii core… you can ask questions about an extension on the extension page as a comment… or in the extensions section of this forum…

As for your problem:

Check the documentation on the extension page - http://www.yiiframework.com/extension/timepicker

In the example this is used:


$this->widget('widgets.timepicker.timepicker'...

instead you put


$this->widget('zii.widgets.timepicker.timepicker'...

I’ve tried both, that way gives me “Alias “widgets.timepicker.timepicker” is invalid. Make sure it points to an existing directory or file.”

I’m actually trying to access this widget through another widget located in /framework/zii/widgets/

Have you added the component to the config file to auto load it? You may need to also subclass the /zii/widget and use the Yii::import() function at the top of the file placed in /components.


<?php

Yii::import('zii.widgets.CPortlet');

Yii::import('widgets.timepicker.timepicker');


class UserMenu extends CPortlet

{

   ...

   public function init()

   {

      ...

      return parent::init();

   }

}

?>

Hello,

I am having trouble with this extension too. I’m trying to use it inside an admin module. My config file look like this:


'modules'=>array(

		...

		'admin'=>array(

			'defaultController'=>'site',

			'components'=>array(

				'timepicker',

			),

		),

                ...

);




'components'=>array(

		'user'=>array(

			'allowAutoLogin'=>true,

		),

		'timepicker' => array(

		),

                ...

);



In my view, I have this:


<?php $this->widget('widgets.timepicker.timepicker', array(

			'model'=>$model,

			'name'=>'Fiesta[fecha_comienzo]',

			'attribute'=>'fecha_comienzo',

			'options'=>array(

				'anim'=>'slide',

				'dateFormat'=>'dd-mm-yy',

				'timeFormat'=>'hh:mm:ss',

				'changeMonth'=>true,

			),

			'htmlOptions'=>array(

		          'style'=>'height:18px;',

		    ),

		));

		?>

I am getting the same exception as above:


Alias "widgets.timepicker.timepicker" is invalid. Make sure it points to an existing directory or file.

Edit:

I have placed the timepicker directory inside protected/extensions.

does anyone got an answer??? i have the same trouble about this error

Alias "widgets.timepicker.timepicker" is invalid. Make sure it points to an existing directory or file.

this is my view

<?php $this->widget(‘widgets.timepicker.timepicker’, array(

    	'model'=&gt;&#036;model,


    	'name'=&gt;'publicated',));?&gt;

and like my pal rymonator says The installation instructions are horrible ("Extract the release file").

i just extract the file in protected/extensinos but it did not worked!!

any help??

my mistake with this view it works fine

<?php

            	&#036;this-&gt;widget('application.extensions.timepicker.EJuiDateTimePicker',array(


                    	'model' =&gt; &#036;model,


                    	'attribute' =&gt;  'PreferredDailyEndTime',


                    	'options' =&gt; array(


                        	'ampm' =&gt; true,


                        	'timeOnly' =&gt; true,


                    	),


                	)


              	);


        	?&gt;

i was getting the error because I extract the files in the extension folder but i corrected my foolish mistake by extracting the entire timepicker folder in the extension folder

I’m using for my validation:


array('email', 'application.extensions.mc.validators.MCEmailExists', 'on' => 'create')

It works fine. But I have a bunch more validators I wrote. How would I define the "application.extensions.mc" in the config so I can shorten each call to:


array('email', 'mc.validators.MCEmailExists', 'on' => 'create')