-
-
Notifications
You must be signed in to change notification settings - Fork 260
Description
<input class="ngDate" type="text" ngxDaterangepickerMd [(ngModel)]="selected" (datesUpdated)="datesUpdated($event)" [timePicker]="true" [timePicker24Hour]="true" [locale]="localeConfig" showCancel="true" />
Create button and event where you will set the values for example: 17.5.2025 5h UTC
var a = new Date("2025-05-17T05:00:00.000Z");
this.selected = {
startDate: dayjs(a),
endDate: dayjs(a),
}
console.log('selected startDate', this.selected.startDate.toISOString());
In console will be: selected startDate 2025-05-17T05:00:00.000Z
ngx-daterangepicker-material in UI shows 2025-05-17 - 7h - my local time
Then open datepicker and click to done button to call datesUpdated event:
console.log('datesUpdated selected startDate', this.selected.startDate.toISOString());
console.log('datesUpdated event startDate', event.startDate.toISOString());
In console will be:
datesUpdated selected startDate 2025-05-17T07:00:00.000Z
datesUpdated event startDate 2025-05-17T07:00:00.000Z
My local time like UTC. There should be 2025-05-17T05:00:00.000Z UTC time which I set, not 7h