Fabrik/fabrik — Issue #192: serious date filter issues
Author: trob
Created: 2012-03-06 22:46:47+00:00
State: open

latest GitHub (2012-03-06 03:07:35), Joomla 2.5.1
all date elements have list and form format %d-%m-%Y, UTC, no time selector

1. date element, list filter=field
selecting 16-02-2012 from date selector --> SQL = WHERE ( `test`.`date_time` BETWEEN '16-02-2012' AND '2012-02-16 23:59:59' )

2. same with URL-filtering:
listid=1&test___date_time[value][]=18-02-2012&resetfilters=1&fabrikdebug=1
--> WHERE ( `test`.`date_time` BETWEEN '18-02-2012' AND '2012-02-18 23:59:59' )

3. URL filter with BETWEEN ignores second date and condition
index.php?option=com_fabrik&view=list&listid=1&resetfilters=1&test___date_time[value][]=20-02-2012&test___date_time[value][]=22-02-2012&test___date_time[condition]=BETWEEN&fabrikdebug=1
--->WHERE ( `test`.`date_time` BETWEEN '20-02-2012' AND '2012-02-20 23:59:59' )

4. different placeholder handling in forms with/without recording to database:
- form without database
jump page = index.php?option=com_fabrik&view=list&listid=1&test___date_time[value][]={___date_time}&resetfilters=1&fabrikdebug=1
is redirecting to
listid=1&test___date_time[value][]=__2012-03-27 23:31:06__&resetfilters=1&fabrikdebug=1

- form with recording in database
index.php?option=com_fabrik&view=list&listid=1&test___date_time[value][]={datummit___date_time}&resetfilters=1&fabrikdebug=1
is redirecting to
listid=1&test___date_time[value][]=__01-03-2012__&resetfilters=1&fabrikdebug=1

------------------------------
Date element range filter is ok:
selecting 18-02-2012 and 21-02-2012 via date selector
--> SQL = WHERE ( `test`.`date_time` BETWEEN '2012-02-18 00:00:00' AND '2012-02-21 23:59:59' )