Difference between #3 and #4 of
How to filter CGridView with From Date and To Date datepicker

Changes

Title unchanged

How to filter CGridView with From Date and To Date datepicker

Category unchanged

Tips

Yii version unchanged

Tags unchanged

date filter, CGridView, date range filter, CGridView date range filter

Content changed

This artical is related to allow user to filter CGridView with date range using datepicker on submit button. Here I use [Yii Cookie](http://www.yiiframework.com/wiki/152/cookie-management-in-yii/ "Yii Cookie") to preserve date in datepicker textbox after submitting the form. Step 1 : Lets insert below code in your view part where required I create one form for submit the dates ( from_date & to_date ) ### View

```php
[...]
Insert below code in controller
### Controller
[...]
Add two public variable in your model class
### Model
[...]
```

### Demo Image
 
![Image](http://i1147.photobucket.com/albums/o556/master753951/photo_order.png "Image")
 
and this is it as you can filter from date range ... .. .
[...]
9 0
26 followers
Viewed: 63 930 times
Version: 1.1
Category: Tips
Written by: kiran sharma
Last updated by: kiran sharma
Created on: Jun 27, 2012
Last updated: 12 years ago
Update Article

Revisions

View all history