php - CJUIDatePicker with CGridView doesn't work -


i trying include datepicker inside cgridview follows, datepicker widget used within grid view.

this->widget('zii.widgets.grid.cgridview', array( 'id'=>'order-grid', 'dataprovider'=>$model->search(), 'filter'=>$model, 'columns'=>array(     'order_id',     'customer.address.firstname',     'customer.address.lastname',     /*array('name' => 'ordering_date',         'value' => 'date("m j, y", $data->ordering_date)'),     */        array('name'=>'ordering_date',                     'value'=>'$data->ordering_date',                          'filter'=>$this->widget('zii.widgets.jui.cjuidatepicker', array(                                                     'model'=>$model,                                                     'attribute'=>'ordering_date',                                                     'options'=>array(                                                             'showbuttonpanel'=>true,                                                             'changeyear'=>true,                                                             )                                                     ),                                                     true),                     'htmloptions'=>array('width'=>'80','style'=>'text-align:center'),             ),                  array(         'class'=>'cbuttoncolumn',          'template' => '{view} {rollback} {receive}{pack} {dispatch}{delivered}',         'htmloptions'=>array('width'=>'250px'),          'buttons'=>array(             'receive'=>array(                 'id'=>'receive',                 'name'=>'receive',                 'url'=>'$this->grid->controller->createurl("/shop/order/admin&received=true", array("id"=>$data->order_id,"asdialog"=>1,"gridid"=>$this->grid->id))',                 'type'=>'submit',                 'imageurl'=>'/mdg/images/receive1.png',                 'visible'=>'($data->status=="pending")?true:false;'              ),              'pack'=>array(                 'id'=>'pack',                 'name'=>'pack',                 'type'=>'submit',                 'url'=>'$this->grid->controller->createurl("/shop/order/admin&packed=true", array("id"=>$data->order_id,"asdialog"=>1,"gridid"=>$this->grid->id))',                 'click'=>'',                 'imageurl'=>'/mdg/images/pack1.png',                 'visible'=>'($data->status=="received")?true:false;'              ),              'dispatch'=>array(                 'id'=>'dispatch',                 'name'=>'dispatch',                 'url'=>'$this->grid->controller->createurl("/shop/order/admin&dispatched=true", array("id"=>$data->order_id,"asdialog"=>1,"gridid"=>$this->grid->id))',                 'click'=>'',                 'imageurl'=>'/mdg/images/dispatch.png',                 'visible'=>'($data->status=="packed")?true:false;'              ),              'delivered'=>array(                 'id'=>'delivered',                 'name'=>'delivered',                 'url'=>'',                 'click'=>'',                 'imageurl'=>'/mdg/images/delivered1.png',                 'visible'=>'($data->status=="dispatched")?true:false;'              ),              'rollback'=>array(                 'id'=>'rollback',                 'name'=>'rollback',                 'url'=>'$this->grid->controller->createurl("/shop/order/admin&rollback=true", array("id"=>$data->order_id,"asdialog"=>1,"gridid"=>$this->grid->id))',                 'click'=>'',                 'imageurl'=>'/mdg/images/rollback.jpg',                 'visible'=>'($data->status=="pending")?false:true;'              ),         ),     ),   'status',  ), 'afterajaxupdate'=>'function(){                                     jquery("#'.chtml::activeid($model, 'ordering_date').'").datepicker({showbuttonpanel:true, changeyear:true});                             }', 

)); ?>

this code taken suggestion given in yiiframework forum. doesnt anything.

any idea why is? thanks!

in case put date picker in _search view. if used gii generate crud, should there, available admin view:

<?php echo chtml::link('advanced search','#',array('class'=>'search-button')); ?> <div class="search-form" style="display:none">
<?php $this->renderpartial('_search',array( 'model'=>$model, )); ?> </div><!-- search-form -->


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -