Skip to content
Permalink
Browse files

set from time according to the to time

  • Loading branch information...
nilskuhn committed Aug 13, 2019
1 parent 1477cf4 commit c8ad1af5b52dbca96d5f6c4f62dea196d4fede85
@@ -60,9 +60,8 @@ export class TimeFrameComponent implements OnInit {

selectTimeFrame(): void {
if (this.timeFrameInSeconds != this.selectableTimeFramesInSeconds[0]) {
let from = new Date();
let to = new Date();
from.setSeconds(to.getSeconds() - this.timeFrameInSeconds);
let from = new Date(to.getTime() - this.timeFrameInSeconds * 1000);
this.selectedDates = [from, to];

if (this.comparativeSelectionActive) {

0 comments on commit c8ad1af

Please sign in to comment.
You can’t perform that action at this time.