</div>
<div class="col-lg-4 form-inline">
<span class="mr-2" i18n>Start Date:</span>
- <eg-date-select [initialIso]="xactsStart"
- (onChangeAsIso)="dateChange('xactsStart', $event)"></eg-date-select>
+ <eg-date-select [initialIso]="paymentsStart"
+ (onChangeAsDate)="dateChange('paymentsStart', $event)"></eg-date-select>
</div>
<div class="col-lg-4 form-inline">
<span class="mr-2" i18n>End Date:</span>
- <eg-date-select [initialIso]="xactsEnd"
- (onChangeAsIso)="dateChange('xactsEnd', $event)"></eg-date-select>
+ <eg-date-select [initialIso]="paymentsEnd"
+ (onChangeAsDate)="dateChange('paymentsEnd', $event)"></eg-date-select>
</div>
</div>
};
}
- dateChange(which: string, iso: string) {
+ dateChange(which: string, d: Date) {
- this[which] = iso;
+ if (which.match(/End/)) {
+ // Add a day to the end date so the DB query includes all of
+ // the selected date.
+ d.setDate(d.getDate() + 1);
+ }
+
+ this[which] = DateUtil.localYmdFromDate(d);
if (which.match(/xacts/)) {
this.xactsGrid.reload();