From 8facba8c16f277834737cf2f738df97d96cd338b Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Tue, 12 Mar 2013 15:59:50 -0700 Subject: [PATCH] Fixed timepicker initialization in since/absolute states --- panels/timepicker/module.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panels/timepicker/module.js b/panels/timepicker/module.js index 5185f7fa7b4..51d28535af0 100644 --- a/panels/timepicker/module.js +++ b/panels/timepicker/module.js @@ -57,13 +57,13 @@ angular.module('kibana.timepicker', []) switch($scope.panel.mode) { case 'absolute': $scope.time = { - from : Date.parse($scope.panel.time.from) || time_ago($scope.panel.timespan), - to : Date.parse($scope.panel.time.to) || new Date() + from : new Date(Date.parse($scope.panel.time.from)) || time_ago($scope.panel.timespan), + to : new Date(Date.parse($scope.panel.time.to)) || new Date() } break; case 'since': $scope.time = { - from : Date.parse($scope.panel.time.from) || time_ago($scope.panel.timespan), + from : new Date(Date.parse($scope.panel.time.from)) || time_ago($scope.panel.timespan), to : new Date() || new Date() } break;