fix timezone in schedule performance date filter
This commit is contained in:
@@ -71,6 +71,8 @@ export class ScheduleComponent implements OnInit {
|
|||||||
const startDate = new Date();
|
const startDate = new Date();
|
||||||
const endDate = new Date();
|
const endDate = new Date();
|
||||||
endDate.setDate(startDate.getDate() + bookableDays - 1);
|
endDate.setDate(startDate.getDate() + bookableDays - 1);
|
||||||
|
startDate.setTime(startDate.getTime() - startDate.getTimezoneOffset() * 60_000);
|
||||||
|
endDate.setTime(endDate.getTime() - endDate.getTimezoneOffset() * 60_000);
|
||||||
|
|
||||||
const startStr = startDate.toISOString();
|
const startStr = startDate.toISOString();
|
||||||
const endStr = endDate.toISOString().split('T')[0] + 'T23:59:59';
|
const endStr = endDate.toISOString().split('T')[0] + 'T23:59:59';
|
||||||
|
|||||||
Reference in New Issue
Block a user