pass a timestamp with 23:59:59 as the end date for the BETWEEN filter
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 10 Dec 2009 20:17:44 +0000 (20:17 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 10 Dec 2009 20:17:44 +0000 (20:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15135 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/standing_penalties.js

index 9534a10..b8d3520 100644 (file)
@@ -395,6 +395,8 @@ function handle_retrieve_archived_penalties() {
         JSAN.use('util.date');
         dojo.require('openils.PermaCrud');
         var pcrud = new openils.PermaCrud( { authtoken :ses() });
+        var date2 = document.getElementById('date2').dateValue;
+        date2.setHours(23); date2.setMinutes(59); date2.setSeconds(59);
         pcrud.search(
             'ausp',
             {
@@ -402,7 +404,8 @@ function handle_retrieve_archived_penalties() {
                 stop_date : {
                     'between' : [ 
                         document.getElementById('date1').value, 
-                        document.getElementById('date2').value == util.date.formatted_date(new Date(),'%F') ? 'now' : document.getElementById('date2').value
+                        document.getElementById('date2').value == util.date.formatted_date(new Date(),'%F') ? 
+                            'now' :util.date.formatted_date( date2 ,'%{iso8601}')
                     ]
                 }
             },