taitems / jQuery.Gantt

jQuery Gantt Chart
http://taitems.github.io/jQuery.Gantt/
MIT License
952 stars 304 forks source link

Bar is going out of the selected time frame. #243

Closed jasjitCheema closed 3 years ago

jasjitCheema commented 3 years ago

Bar is going out of the selected time frame.

Bar from start date gets increased on Zooming. Screenshot

And end date is always showing more than saved in database

Screenshot

usmonster commented 3 years ago

Hello! Thanks for using this plugin and taking the time to report your issue.

To help me better troubleshoot what's happening, can you please provide a link to a working minimal demo of the problem, preferably on JSFiddle or similar? Thanks again!

jasjitCheema commented 3 years ago

Please check

https://servebetter.ultimatecodesolutions.com/web/public/project-planing

First login using admin1@gmail.com 12345678

Thanks

usmonster commented 3 years ago

Thanks for the demo, it was very helpful in finding the cause of your issue.

I've reduced what I saw to this JSFiddle: https://jsfiddle.net/r54x3npd/3/

As I saw in your source, the dates are given in the milliseconds format, which always translates to an absolute time. In this case, it means that the chart will render differently depending on the time zone of the viewer, which can be a desired behavior in many cases.

In your case, however, you probably mean to specify "floating" dates and times so that the time will display the same everywhere. Here's an example how you could do that: https://jsfiddle.net/r54x3npd/4/

Since this is behaving as expected, I will close this issue. Feel free to comment or reopen if necessary, and thanks again for taking the time to ask your question here.