Skip to content

Commit

Permalink
fix(angular): emit end date with 23:59:59.999 (closes #522)
Browse files Browse the repository at this point in the history
  • Loading branch information
fynnfeldpausch committed May 29, 2024
1 parent ad76f6d commit f6f5fc0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export class DateValueAccessor extends ValueAccessor {
if (!this.el.nativeElement.range) {
return super.handleChangeEvent(this.toDate(value));
} else if (typeof value === 'string') {
return super.handleChangeEvent(JSON.parse(value).map(this.toDate));
const data = JSON.parse(value).map(this.toDate);
data[1]?.setHours(23, 59, 59, 999);
return super.handleChangeEvent(data);
}
super.handleChangeEvent(null);
}
Expand Down

0 comments on commit f6f5fc0

Please sign in to comment.