Logic error trying to merge the date component of one date object with the time compo...
[evergreen-equinox.git] / Open-ILS / xul / staff_client / chrome / content / util / timestamp.js
index 0c0a8ab..141551c 100644 (file)
@@ -127,13 +127,12 @@ function gen_handle_apply(params) {
 
                 var tp_date = tp.dateValue;
                 var dp_date = dp.dateValue;
-                tp_date.setFullYear( dp_date.getFullYear() );
-                tp_date.setMonth( dp_date.getMonth() );
-                tp_date.setDate( dp_date.getDate() );
+                dp_date.setHours( tp_date.getHours() );
+                dp_date.setMinutes( tp_date.getMinutes() );
 
                 update_modal_xulG(
                     {
-                        'timestamp' : util.date.formatted_date(tp_date,'%{iso8601}'),
+                        'timestamp' : util.date.formatted_date(dp_date,'%{iso8601}'),
                         'complete' : 1
                     }
                 )