Yii Framework Forum: CJuiDateTimePicker not changed after editing text field - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CJuiDateTimePicker not changed after editing text field Rate Topic: *---- 1 Votes

#1 User is offline   littleklein 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 05-May 12
  • Location:Slovakia

Posted 06 June 2012 - 06:59 PM

Hi,

I am trying to use CJuiDateTimePicker and having the problem with editing text field directly. After I set the values in CJuiDateTimePicker it affects the text field but not vice-versa. If I focus into the text field and change for example datetime
2012-06-07 01:48
to
2010-06-07 01:48
the year should be selected also in the picker.

Maybe I have sth wrong in code (I am newbie).

Here is a snippet from my view:
<div class="row">
		<?php echo $form->labelEx($model->solutionSpentTimes,'datetime_from'); ?>
                <?php Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
                    $this->widget('CJuiDateTimePicker',array(
                        'model'=>$model->solutionSpentTimes, //Model object
                        'attribute'=>'datetime_from', //attribute name
                        'mode'=>'datetime', //use "time","date" or "datetime" (default)
                        'language' => '',
                        'options'=>array(
                            'showAnim'=>'fold',
                            'showButtonPanel'=>true,
                            'autoSize'=>true,
                            'dateFormat'=>'yy-mm-dd',
                            'timeFormat'=>'hh:mm',
                            'witdh'=>'120',
                            'separator'=>' ',
                        ),
                        'htmlOptions' => array(
                            'style' => 'width:180px;',
                        ),
                    ));
                ?>
        </div>


Thanks in advance.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users