date pickers work

This commit is contained in:
Felix 2019-08-15 16:34:13 +01:00
parent a5b32936bd
commit 5ffffbfe08
2 changed files with 3 additions and 3 deletions

View file

@ -6,9 +6,9 @@
<h4 class="card-title mb-0">Spend amount and number of purchases by supplier name</h4> <h4 class="card-title mb-0">Spend amount and number of purchases by supplier name</h4>
</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()" (change)="bubbleChartUpdate()"> <input type="date" [ngModel]="bubbleChartBegin" (ngModelChange)="bubbleChartUpdate()" (change)="bubbleChartUpdate()">
<!-- THESE INPUT BOXES DO NOT WORK. Their value remains the client machine's date/time despite changing. --> <!-- THESE INPUT BOXES DO NOT WORK. Their value remains the client machine's date/time despite changing. -->
<input type="date" (ngModel)="bubbleChartEnd" (ngModelChange)="bubbleChartUpdate()" (change)="bubbleChartUpdate()"> <input type="date" [ngModel]="bubbleChartEnd" (ngModelChange)="bubbleChartUpdate()" (change)="bubbleChartUpdate()">
</div> </div>
</div> </div>
<div> <div>

View file

@ -185,7 +185,7 @@ export class MoreStuffComponent implements OnInit {
} }
bubbleChartUpdate() { bubbleChartUpdate() {
console.log("start_range input box: " + this.bubbleChartBegin.date); console.log("start_range input box: " + this.bubbleChartBegin);
console.log("start_range : " + new Date(this.bubbleChartBegin)); console.log("start_range : " + new Date(this.bubbleChartBegin));
console.log("end_range input box: " + this.bubbleChartEnd); console.log("end_range input box: " + this.bubbleChartEnd);
console.log("end_range : " + new Date(this.bubbleChartEnd)); console.log("end_range : " + new Date(this.bubbleChartEnd));