Skip to content

Commit

Permalink
fix(wmstime): set only if min or max date is undefined (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
gignacnic authored and mbarbeau committed May 3, 2018
1 parent cf7c77d commit 2878cea
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib/filter/time-filter-form/time-filter-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,12 @@ export class TimeFilterFormComponent implements OnInit {
constructor() { }

ngOnInit() {
this.startDate = new Date(this.min);
this.endDate = new Date(this.max);
if (this.startDate === undefined) {
this.startDate = new Date(this.min);
}
if (this.endDate === undefined) {
this.endDate = new Date(this.max);
}
}

handleDateChange(event: any) {
Expand Down

0 comments on commit 2878cea

Please sign in to comment.