Usuage sample:
$this->widget('ext.YiiDateTimePicker.jqueryDateTime', array(
'model' => $model,
'attribute' => 'attribute-tablefield',
'options' => array(
'lang' => 'en',
'format'=> 'Y-m-d H:i', //Y-m-d,
'value' => date('Y-m-d H:i'),
'timepicker'=> TRUE, // False
'step' => 15,
'closeOnDateSelect' => true,
'closeOnWithoutClick' => true,
'scrollMonth' => false,
'scrollTime' => false,
), // DateTimePicker options
'htmlOptions' => array(
'style' => 'width:140px; display:none;',
'placeholder' => 'YYYY-MM-DD',
'class' => $model->hasErrors('attribute-tablefield') ? CHtml::$errorCss : '',
),
));
Reference
http://www.yiiframework.com/extension/date-time-picker/
$this->widget('ext.YiiDateTimePicker.jqueryDateTime', array(
'model' => $model,
'attribute' => 'attribute-tablefield',
'options' => array(
'lang' => 'en',
'format'=> 'Y-m-d H:i', //Y-m-d,
'value' => date('Y-m-d H:i'),
'timepicker'=> TRUE, // False
'step' => 15,
'closeOnDateSelect' => true,
'closeOnWithoutClick' => true,
'scrollMonth' => false,
'scrollTime' => false,
), // DateTimePicker options
'htmlOptions' => array(
'style' => 'width:140px; display:none;',
'placeholder' => 'YYYY-MM-DD',
'class' => $model->hasErrors('attribute-tablefield') ? CHtml::$errorCss : '',
),
));
Reference
http://www.yiiframework.com/extension/date-time-picker/