ngx-daterangepicker-material
ngx-daterangepicker-material copied to clipboard
End date is wrongly return on event
Versions
- Angular version: 14
- component version: 6.0.4
Describe the bug The end date is always the next day of what we selected in the date picker. This occurs in the demo site itself. Refer the screenshot.
To Reproduce Refer the screenshot
Expected behavior Should be the same date that we select in the date picket
Screenshots
Demo site link Demo site
is this because of
if (!this.timePicker) {
this.pickingDate = false;
this.endDate = this.endDate.add(1, 'd').startOf('day').subtract(1, 'second');
}
in ngx-daterangepicker-material.mjs
+1
I just had a bug ticket assigned to me that sounds like the same issue. We're using version 5.0.1, Angular 11
We have a preset for Month to Date, but if you select the 1st to yesterday it switches to Month to Date and pushes the end date out one day to today's date. I also tried removing the preset but it still pushes out the end date by one day.
If I comment out the lines listed above by @gopal-augment the issue doesn't occur so it must be causing this issue as well.
I've been trying to figure out a way to override that method using a Directive but it doesn't seem to work.
@Franccescalee any update on this?
@gopal-augment not that I know of. I ended up removing the ngx-daterangepicker-material library from my app and created my own component.
@fetrarij
@fetrarij Any Update on this? IS there any other alternative for it?
compare timezone of local and utc , there must be jet lag