Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When set end date to last day of week, another empty week is rendered #284

Open
MrNorth35 opened this issue Feb 11, 2020 · 3 comments
Open

Comments

@MrNorth35
Copy link

MrNorth35 commented Feb 11, 2020

When I add a task to an empty gantt-diagram and set the end date of that task to "2020-02-23", I get a whole new week (which is empty) displayed right after the 23rd.

If I set the end date of the task to "2020-02-22", only the week containg that date is rendered, which is correct.

What is going on there with that last day of the week? What triggers the calendar to start rendering a new full week, even if the latest task is not in range of that week. Is there something going on with UTC/time component?

I set the data using JSON, here is an example:

pID: 1010
pName: "Förvaring"
pStart: "2020-02-14"
pEnd: "2020-02-23"
pClass: "gtaskyellow"
pGroup: 0
pParent: 1000
pOpen: 1
pObjectID: ""
pRes: ""

I tried to use the method myGanttChart.setMaxDate('2020-02-23'): to make it cut the calendear after that sunday, but it refuses to do so, it still renders one empty week.

@mariohmol
Copy link
Collaborator

maybe try to pass date with full info? like HHMMSS TMZ.....

@mishellscripts
Copy link

Getting this issue on my side as well. If set date to end of the week including time (ex. 2020-11-22T13:00:00), an empty week is rendered
image

@mariohmol
Copy link
Collaborator

There is a line which should take this vMaxDate as reference, check it out

https://github.com/jsGanttImproved/jsgantt-improved/blob/master/src/draw.ts#L774

could u provide a json file to test this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants