Wiki

Articles tagged with "date range filter"X
Displaying 1-3 of 3 result(s).

CGridView Date Range Without Cookies or Session (External Filtering)

Created 4 years ago by ezekielnoobHow-tos6 comments – viewed 14,363 times – ( +5 / -1 ) – version 1.1
Here's a tutorial on how to create a CGridView with external date filters the trick is to create hidden columns within the CGridView Filters something like in the example below:

Adding a date range search for CGridView the easy way

Created 4 years ago by mikewalenTips6 comments – viewed 32,943 times – ( +12 / -2 ) – version 1.1
After a lot of research, everything I found on adding date range searching to a CGridView advanced search form seemed to involve adding two new public variables (e.g. $date_from, $date_to), 'safe' rules for the new variables, and a rather chunky if/elseif/else check in the search() method. This probably isn't a hassle for most, but because many of the tables in my database contain two or three and sometimes four date columns (e.g. date_created, date_modified, date_deleted etc.), it meant I was having to add up to eight public variables, the corresponding safe rules, and modifying the search() criteria for each date attribute. So, I set about creating a better way and I thought I'd share my work with the community.

How to filter CGridView with From Date and To Date datepicker

Created 5 years ago by kiran sharmaTips16 comments – viewed 51,399 times – ( +17 / -5 ) – version 1.1
This artical is related to allow user to filter CGridView with date range using datepicker on submit button. Here I use Yii Cookie to preserve date in datepicker textbox after submitting the form.