more debugging

This commit is contained in:
Felix 2019-08-15 14:51:10 +01:00
parent 88bd12157b
commit 5b50803a25
2 changed files with 9 additions and 0 deletions

View file

@ -7,6 +7,7 @@
</div> </div>
<div class="col-sm-5 hidden-sm-down"> <div class="col-sm-5 hidden-sm-down">
<input type="date" (ngModel)="bubbleChartBegin" (ngModelChange)="bubbleChartUpdate()"> <input type="date" (ngModel)="bubbleChartBegin" (ngModelChange)="bubbleChartUpdate()">
<!-- THESE INPUT BOXES DO NOT WORK. Their value remains the client machine's date/time despite changing. -->
<input type="date" (ngModel)="bubbleChartEnd" (ngModelChange)="bubbleChartUpdate()"> <input type="date" (ngModel)="bubbleChartEnd" (ngModelChange)="bubbleChartUpdate()">
</div> </div>
</div> </div>

View file

@ -63,11 +63,14 @@ export class MoreStuffComponent implements OnInit {
console.log("using range " + start_range + " : " + end_range); console.log("using range " + start_range + " : " + end_range);
result.data.map(item=> { result.data.map(item=> {
let is_item_in_range = (new Date(item.date) >= new Date(start_range) && new Date(item.date) <= new Date(end_range)); let is_item_in_range = (new Date(item.date) >= new Date(start_range) && new Date(item.date) <= new Date(end_range));
// there are a lot of `new Date(blah)` but that is what works for some reason.
// IT WORKS!!!!!!!!! // IT WORKS!!!!!!!!!
console.log("item.date : " + new Date(item.date)); console.log("item.date : " + new Date(item.date));
console.log("start_range input box: " + start_range);
console.log("start_range : " + new Date(start_range)); console.log("start_range : " + new Date(start_range));
console.log("end_range input box: " + end_range);
console.log("end_range : " + new Date(end_range)); console.log("end_range : " + new Date(end_range));
console.log("item.date >= start_range: " + (new Date(item.date) >= new Date(start_range))); console.log("item.date >= start_range: " + (new Date(item.date) >= new Date(start_range)));
console.log("item.date <= end_range: " + (new Date(item.date) <= new Date(end_range))); console.log("item.date <= end_range: " + (new Date(item.date) <= new Date(end_range)));
@ -182,6 +185,11 @@ export class MoreStuffComponent implements OnInit {
} }
bubbleChartUpdate() { bubbleChartUpdate() {
console.log("start_range input box: " + this.bubbleChartBegin);
console.log("start_range : " + new Date(this.bubbleChartBegin));
console.log("end_range input box: " + this.bubbleChartEnd);
console.log("end_range : " + new Date(this.bubbleChartEnd));
// this is called when daterange is changed // this is called when daterange is changed
this.loadSupplierBubble(true, (this.bubbleChartBegin), (this.bubbleChartEnd)); this.loadSupplierBubble(true, (this.bubbleChartBegin), (this.bubbleChartEnd));
console.log("Bubble chart updating..."); console.log("Bubble chart updating...");