jsGanttImproved / jsgantt-improved

Javascript Gantt: fully featured gantt chart component built entirely with JS and CSS. No images or external libs required.
https://jsganttimproved.github.io/jsgantt-improved
Other
483 stars 249 forks source link

Issues with Dates #212

Closed Adrish-ASProg closed 5 years ago

Adrish-ASProg commented 5 years ago

When providing invalid date using edit mode or "setStart" / "setEnd" methods, an error is thrown but the date is still set as NaN/NaN/NaN, preventing from switching to edit mode after that. (Constantly throwing "RangeError: Invalid time value")

Moreover, the function "getMinDate" (and I guess getMaxDate too) throws error when no tasks are left in the chart, as the method is directly using vTasklist[0] without checking before if it exists, so we can not empty the chart. Edit: I just see if (this.vTaskList.length > 0) in the Draw method, but this is before using processRows method which can delete some tasks so this do not prevent from calling getMinDate and getMaxDate

mariohmol commented 5 years ago

thanks!!

could u provide a PR so we can merge in?

mariohmol commented 5 years ago

this is on #215 as well.. right?

mariohmol commented 5 years ago

released on 2.2.7

Adrish-ASProg commented 5 years ago

Yep, #215 should fix this

mariohmol commented 5 years ago

do u use angular / react or vue? because when changes here its needed to update the other components

Adrish-ASProg commented 5 years ago

Yes i'm using Angular, what do you mean by "the other components" ? Are the changes needed in docs/*.js files ? If so I'll make changes here too, sry

mariohmol commented 5 years ago

dont need the docs.. cause i need to push the new version to npm anyway..

check this component https://github.com/jsGanttImproved/ng-gantt

Adrish-ASProg commented 5 years ago

I don't understand what you mean Changes I made should affect ng-gantt the same way it affects other components, as they depend on the same 'jsgantt-improved' package, doesn't it ?

mariohmol commented 5 years ago

Yes... but... i have to update the jsgantt-improved in 2 files:

increase the ng-gantt version and then publish on npm again