mirror of
https://github.com/grafana/grafana.git
synced 2025-01-05 21:53:45 -06:00
Fixed timepicker initialization in since/absolute states
This commit is contained in:
parent
5eb8d88a98
commit
8facba8c16
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user