Using CJuiDateTimePicker?

Hello everybody, in the view stated thus:

<div class="row">

		<?php echo $form->labelEx($newsPublication,'publicationdate'); ?>

		<?php Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');







		<?php //echo $form->textField($newsPublication,'publicationdate'); ?>

		<?php echo $form->error($newsPublication,'publicationdate'); ?>


And I copied the folder protected/extensions/CJuiDateTimePicker

But the following error in firebug:

What’s missing?

Another thing, when I use an extension, what do I have to config/main.php?


It seems that the jquery-ui(.min).js is missing.

Yii::app()->getClientScript()->registerCoreScript('jquery-ui', CClientScript::POS_HEAD);

might work.

The error continue…


<?php Yii::app()->getClientScript()->registerCoreScript('jquery-ui', CClientScript::POS_HEAD); ?>


<div class="row">

		<?php echo $form->labelEx($newsPublication,'publicationdate'); ?>

		<?php Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');


		        'model' => $newsPublication,

		        'attribute' => 'publicationdate',

				'mode' => 'datetime',



		<?php //echo $form->textField($newsPublication,'publicationdate'); ?>

		<?php echo $form->error($newsPublication,'publicationdate'); ?>



Does the line report an error? If it does, what kind?

I’m sorry, I’m not familiar with firebug … I’m using chrome’s developer tool.

I demonstrated that the file jquery-ui(.min.).js loaded

I see.

I’m sorry, but I’m lost too.

Have you got other information that can be relevant to the problem?

Worse than not, I am new in Yii.

In short I want to put a calendar in a date field, needed only a simple example which has a field with a calendar using Yii

I posted a example on this previously.

Thank’s, but…


I’ve noticed that you are using a lot of jquery-ui stuffs together with Datepicker, namely elFinder, tinyMCE, …

And googling "elFinder Datepicker" has brought me to a page like this:

The article is a little old now, but may bring some light on the problem.

So, why don’t you start just with a Datepicker (or DateTimePicker) without those stuffs? If it works, then add them one by one to check the possible conflicts among them.

Thanks for the tip, actually remove the tinyMCE, the calendar is working:

<div class="row">

		<?php //echo $form->labelEx($model,'body'); ?>

		<?php //$this->widget('application.extensions.tinymce.ETinyMce', array('editorTemplate'=>'full', 'model'=>$model, 'attribute'=>'body')); ?>

		<?php //echo $form->error($model,'body'); ?>


But how to solve this?

Please use Zii CJuiDatePicker which is a wrapper of Jquery UI Datepick.

Tutorial @

If you have question, I am here to help. I’ve done enough with ziiDatePicker to know 1 or 2 tricks

Thank’s nguyendh, but continued to be conflicts with TinyMCE:

I don’t use javascript WYSIWYG editors myself, so I can’t help you much on this.

But there are a few thins that I can think of.

TinyMCE extension that you are using seems a little bit out of date. It wraps TinyMCE 3.2.5 but the current version of TinyMCE is I’m afraid that this is the cause of the conflict against DateTimePicker (or the underlying latest jquery-ui). I’m not really sure of, though.

The author of the extension says that an update will be coming soon. tinymce extension

Another candidate for a tinymce extension may be "tinymceelfinder".

This wraps TinyMCE 3.3.8.

I think it’s worth trying.


As for CJuiDateTimePicker and CJuiDatePicker, the former is a very thin wrapper over the latter when it operates on "date" mode as far as I can see. There should be no substantial difference between the two in your case.

try this

also, google [b(a).zIndex is not a function], I’ve seen some posts talking about your problem.