omusico / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

'Page not found' when date entered in the filter in format yyyy/MM/dd #822

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Hi there, apologies for posting this (it has been raised in issue 216) but I am 
probably missing a very obvious thing. I am trying to use the custom filter 
transform. I have been trying to follow the solution given in Issue 216 but 
must be missing something.
1. An example of the code to retrieve the contents of a table called 
'timesheet' with column week_ending_date formatted to yyyy/MM/dd:
************* code *************
function transform_date_for_grid($value) {
   return str_replace("/","-",$value);
}

$grid = Bvb_Grid::factory('Table');
$filters1 = new Bvb_Grid_Filters();
$filters1->addFilter('date',array('transform'=>'transform_date_for_grid'));

$select = $this->_db->select()->from('at_timesheet');

$grid->setSource(new Bvb_Grid_Source_Zend_Select($select));
$grid->updateColumn('week_ending_date',array('format'=>array('date',array('date_
format' => 'yyyy/MM/dd'))));   
$grid->addFilters($filters1);

$myGrid = $grid->deploy();
$this->view->grid = $myGrid;
************* code *************
2. Set a filter in the column 'week_ending-date'

What is the expected output? What do you see instead?
The requested URL was not found on this server.

Please insert the appropriate values;
                    Zend Framework version:1.11.5
ZFDatgrid Version (Bvb_Grid::getVersion()):0.8
Operating system:
                               PHP Version:5.2.17
Database Server and version:
Source Adatapter:

Please provide any additional information below.

Original issue reported on code.google.com by linuis...@hotmail.com on 9 Feb 2012 at 9:24

GoogleCodeExporter commented 9 years ago
Hi,

transform_date_for_grid is called? If not, try see my issue #812 response.

Best Regards
Ivo Monteiro

Original comment by ivomonte...@gmail.com on 14 Mar 2012 at 8:43

GoogleCodeExporter commented 9 years ago

Original comment by licentia...@gmail.com on 6 May 2012 at 5:49