Hi,
When filtering on Date->Last Month the first day of the last month is not included.
For example - if the particular date column has two rows that come back as:
2023-11-01
2023-11-02
And if I try filtering on Date->Last month today, 2023-12-21 at 6:40AM Eastern US time, the only row that comes back is the second one 2023-11-02
If I change my computer's timezone to be equal to UTC then it works.
I am using the latest ngx-flexmonster (2.9.66)
Note that his issue is identical to the one that was raised 2 years ago: Current Month not including results when the date is the first day of the month
Hello,
Thank you for reporting this issue.
Our developer team will closely examine this behavior within our research. We will return to you with a solution, ETA Jan 9th, 2024.
Feel free to contact us if any other questions arise.
Best Regards,
Maksym
Hello,
We are happy to inform you that the issue with date filters such as "current", "last", and "next" when Daylight Saving Time starts or ends was fixed. This is available in the 2.9.68 version of Flexmonster: https://www.flexmonster.com/release-notes/version-2-9-68/
You are welcome to update the component. Here is our guide on upgrading to the latest version: https://www.flexmonster.com/doc/updating-to-the-latest-version/
Please tell us if the fix works.
Best Regards,
Maksym
Hi,
It seems that the issue is fixed but there is a new problem now. When I navigate away from our page that contains flexmonster I get this error:
Uncaught (in promise): TypeError: Cannot read properties of null (reading 'dispose') TypeError: Cannot read properties of null (reading 'dispose') at FlexmonsterComponent.ngOnDestroy (https://localhost:4200/libs_feature_lpms_ui_src_index_ts.js:64865:30) at executeOnDestroys
This is because from in our Host component we have this code in ngOnDestroy()
ngOnDestroy() {
if (this.pivot) {
this.pivot.flexmonster.dispose();
}
}
Basically it checks for existence of flexmonsterpivot, then accessed flexmonster property to dispose it. But something must have changed with the latest version because it appears that pivot.flexmonster was NULL at the time it was called.
Is there a different way to do this now ?
Hello,
Thank you for your feedback.
As you have mentioned, the error is caused by one of the other changes in the latest update. Since Flexmonster 2.9.68, the implementation of the ngOnDestroy
method was added to ngx-flexmonster
and ng-flexmonster
wrappers, meaning that now dispose()
is automatically called on destroy. As a result, the Flexmonster object is already disposed of when the dispose()
method is called, causing the error.
We recommend removing the dispose()
API call from the ngOnDestroy
hook, or adding an additional check for this.pivot.flexmonster
:
ngOnDestroy() {
if(this.pivot && this.pivot.flexmonster)
this.pivot.flexmonster.dispose();
}
Please let us know if our answer was helpful.
Best Regards,
Maksym