Hi
I've got a problem with my CGridview. One of the fields in my grid view is a date and I want to be able to filter this field in the grid view. I want to do this by using a CJuiDatePicker.
I've got two text field and a button in a form above the grid view in each text field I want to select a date using the date picker and when I push the button I want the grid view to update and show the records between these two dates. Is this possible using Ajax or by using another method.I hope you can make sense of my explanation.
Code for the date pickers:
Grid view:
Thanks
I've got a problem with my CGridview. One of the fields in my grid view is a date and I want to be able to filter this field in the grid view. I want to do this by using a CJuiDatePicker.
I've got two text field and a button in a form above the grid view in each text field I want to select a date using the date picker and when I push the button I want the grid view to update and show the records between these two dates. Is this possible using Ajax or by using another method.I hope you can make sense of my explanation.
Code for the date pickers:
<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array( 'name'=>'firstDate', 'options'=>array('showAnim'=>'fold', 'dateFormat'=>'yy-mm-dd', ), 'htmlOptions'=>array( 'style'=>'height:20px;', ), )); ?>
Grid view:
<?php $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'aanwezig-grid', 'dataProvider'=>$model->search(), 'filter'=>$model, 'columns'=>array( 'firstname', 'name', 'group', 'date', 'time', array( 'class'=>'CButtonColumn', ), ), )); ?>
Thanks