If I enter a value in one of the filter columns and then tab away - the filter is applied. I then use the pager to go to another page - again works fine. I then change the filter value and tab away - but the original filter value remains.
Is this the expected behaviour or is it a bug?
Does anyone know how to search on a datetime field using the filters? I’m displaying the date as follows:
public function getRegisterDate()
{
return date('d M Y H:i', strtotime($this->register_date));
}
Returns: 10 Oct 2010 10:00
So I want to be able to search the date in that particular format, however it will currently only allow me to search if I put in the MYSQL DATETIME format. I have tried setting the ‘compare’ value for this attribute in the search() function but I cannot get it to work as intended.
2 - the search is done in the $model->search() method… there you can elaborate the entered value as you need it and perform the search… for now I think you have just $criteria->compare(‘date field’,‘entered date value’) and that’s why it filters only if you enter mysql date…
And this works fine for me, in that it filters out the records. However when tabbing away from the filter field the date gets displayed in its MYSQL DATETIME format - any way to make it retain the value the user inputted?