javascript + tabular input + CJuiDatePicker


I’m using CJuiDatePicker in table’s cells where rows can be added using javascript. I’m following the code structure explained in this link: javascript + tabular input

In one cell, instead of using textField, I’m using CJuiDatePicker. In the view form/studentRow my code is:




        $form->widget('zii.widgets.jui.CJuiDatePicker', array(

            'model' => $model,

            'attribute' => "[$id]desde",

            // additional javascript options for the date picker plugin

            'language' => 'es',

            'options' => array(

                'showAnim' => 'fold',

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


            'htmlOptions' => array(

                'style' => 'height:16px; width:70px;'




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



        <?php echo $form->textField($model, "[$id]fa", array('size' => 2, 'maxlength' => 4)); ?>

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



        <?php echo $form->DropDownList($model, "[$id]formadia_id", CHtml::listData(CurvaDia::model()->findAll(), 'id', 'id')); ?>

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




        echo '<input type="button" value="-" onclick="deleteDato($(this), 365)" class="delete" title="Eliminar punto de curva" id="botonMasMenos" />';




When de page is rendered with the data fetched from de database, the date picker in those cells work ok. But after adding a new row, date picker doesn’t work.

Can anyone help me please?

i have the same issue on my time picker…

anyone help. my time picker in my form


            <?php echo $form->labelEx($model,"[$id]time"); ?>

            <?php $this->widget('application.extensions.jui_timepicker.JTimePicker', array(





                 'hours'=>array('starts'=>07, 'ends'=>18),








Each time you clone a row you need to reinitialize the widget on that row.

Search for jqrelcopy for inspiration.

You can try the multimodelformextension.

JS-code for handling the reinitializing after clone is included.

See chapter ‘Usage widget form elements’.

After adding new row for add call this below function And All new dates must have same class (.date)

Yii::app()->clientScript->registerScript('re-install-date-picker', "

function reinstallDatePicker(id, data) {




SOLVE thank you for your extension…