Hello,
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:
<tr>
<td>
<?php
$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'); ?>
</td>
<td>
<?php echo $form->textField($model, "[$id]fa", array('size' => 2, 'maxlength' => 4)); ?>
<?php echo $form->error($model, 'fa'); ?>
</td>
<td>
<?php echo $form->DropDownList($model, "[$id]formadia_id", CHtml::listData(CurvaDia::model()->findAll(), 'id', 'id')); ?>
<?php echo $form->error($model,'formadia_id'); ?>
</td>
<td>
<?php
echo '<input type="button" value="-" onclick="deleteDato($(this), 365)" class="delete" title="Eliminar punto de curva" id="botonMasMenos" />';
?>
</td>
</tr>
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?