telerik / kendo-angular

Issue tracker - Kendo UI for Angular
http://www.telerik.com/kendo-angular-ui/
Other
463 stars 213 forks source link

[Gantt] Year view throws an error if the Task start and end date are null #4305

Open yanmariomenev opened 1 month ago

yanmariomenev commented 1 month ago

Describe the bug This error only happens to the year view and the rest of the views are not throwing the Error: Cannot read properties of null (reading 'getFullYear') error. In general, the Task required the start and end date, but we can avoid throwing the error in the year view.

Another side effect is due to the error the year view tasks rendering is also breaking:

Screenshot 2024-05-17 at 12 32 56

To Reproduce Open the following example and choose the year view from the dropdown options: https://stackblitz.com/edit/angular-rbzrjk?file=src%2Fapp%2Fhierarchical-data.ts,src%2Fapp%2Fapp.module.ts Check the console for the error and you can change to other views to see that the error isn't present.

Expected behavior The error to not be thrown and the tasks to render like the rest of the views. The error can be exchanged for a warning message.

**Screen recording***

Year view breaking the task rendering:

https://github.com/telerik/kendo-angular/assets/49076727/9789f6db-c5bd-42ad-bb94-7762c04cda4a