Commit 8facba8c by Rashid Khan

Fixed timepicker initialization in since/absolute states

parent 5eb8d88a
...@@ -57,13 +57,13 @@ angular.module('kibana.timepicker', []) ...@@ -57,13 +57,13 @@ angular.module('kibana.timepicker', [])
switch($scope.panel.mode) { switch($scope.panel.mode) {
case 'absolute': case 'absolute':
$scope.time = { $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 : Date.parse($scope.panel.time.to) || new Date() to : new Date(Date.parse($scope.panel.time.to)) || new Date()
} }
break; break;
case 'since': case 'since':
$scope.time = { $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() to : new Date() || new Date()
} }
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment